本文整理汇总了C#中BLL.ReceiveDoc.GetAllTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.GetAllTransaction方法的具体用法?C# ReceiveDoc.GetAllTransaction怎么用?C# ReceiveDoc.GetAllTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.GetAllTransaction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReceiveDoc
/* private void GenerateBinCard()
{
ReceiveDoc rec = new ReceiveDoc();
IssueDoc iss = new IssueDoc();
Disposal dis = new Disposal();
DisposalReasons res = new DisposalReasons();
Balance bal = new Balance();
GeneralInfo info = new GeneralInfo();
YearEnd yEnd = new YearEnd();
Items itm = new Items();
info.LoadAll();
year = Convert.ToInt32(cboYear.SelectedItem);
DataTable dtRec = rec.GetAllTransaction(itemId,storeId,dtCurrent.Month,year);
DataTable dtIss = iss.GetTransactionByItemId(storeId, itemId, year);
DataTable dtDis = dis.GetTransactionByItemId(storeId, itemId, year);
Int64[] cStockout = { 0, 0, 0 };
Int64[] cOverStock = { 0, 0, 0 };
Int64[] cNearStockOut = { 0, 0, 0 };
Int64[] cBelowMin = { 0, 0, 0 };
//DateTime dtThree = dtCurrent.AddMonths(3);
DataTable dtbin = new DataTable();
string[] col = { "Date", "Ref. No", "Receive", "Issue", "Unit Price", "Balance", "Batch No", "Expiry Date","To / From"};
foreach (string str in col)
{
dtbin.Columns.Add(str);
}
int i = 0;
Int64 bBalance = 0;
dtDate.Value = DateTime.Now;
dtDate.CustomFormat = "MM/dd/yyyy";
dtCurrent = ConvertDate.DateConverter(dtDate.Text);
bBalance = yEnd.GetBBalance(year, storeId, itemId,dtCurrent.Month);
Int64 balanceAmount = bBalance;
Int64 mincon = 0;
Int64 maxcon = 0;
double eopcon = 0;
DateTime dtT = new DateTime();
string balanceAm = "";
txtBBalance.Text = bBalance.ToString();
string ddDate = "";
string batNo = "";
foreach (DataRow dvRec in dtRec.Rows)
{
i++;
if (Convert.ToInt32(dvRec["Transact"]) == 1)
{
rec.LoadByPrimaryKey(Convert.ToInt32(dvRec["ID"]));
balanceAmount = balanceAmount + Convert.ToInt64(dvRec["Quantity"]);
balanceAm = (balanceAmount > 0) ? balanceAmount.ToString("#,###") : "0";
itm.LoadByPrimaryKey(rec.ItemID);
if (itm.NeedExpiryBatch)
{
ddDate = rec.ExpDate.ToString("MMM dd,yyyy");
batNo = rec.BatchNo;
}
Supplier sup = new Supplier();
sup.LoadByPrimaryKey(rec.SupplierID);
object[] obj = { Convert.ToDateTime(dvRec["Date"]).ToString("MM dd,yyyy"), dvRec["RefNo"], Convert.ToInt64(dvRec["Quantity"]).ToString("#,###"), "", Convert.ToDouble(dvRec["Cost"]).ToString("C"), balanceAm, batNo, ddDate, sup.CompanyName};
dtbin.Rows.Add(obj);
//For stock Out
dtT = Convert.ToDateTime(dvRec["Date"]);
//int monb = (dtT.Month < 11) ? dtT.Month + 2 : ((dtT.Month == 11) ? 1 : 2);
//int yer = (dtT.Month < 11) ? dtT.Year : dtT.Year - 1;
Int64 bBal = bal.GetSOH(itemId, storeId, dtT.Month, dtT.Year);
Int64 bAmc = bal.CalculateAMC(itemId, storeId, dtT.Month, dtT.Year);
mincon = bAmc * info.Min;
maxcon = bAmc * info.Max;
eopcon = bAmc * info.EOP;
if (balanceAmount == 0)
{
if (Convert.ToDateTime(dvRec["Date"]) <= dtCurrent && Convert.ToDateTime(dvRec["Date"]) >= dtCurrent.Subtract(TimeSpan.FromDays(90)))
{
cStockout[0]++;
}
else if (Convert.ToDateTime(dvRec["Date"]) <= dtCurrent && Convert.ToDateTime(dvRec["Date"]) >= dtCurrent.Subtract(TimeSpan.FromDays(180)))
{
cStockout[1]++;
}
else if (Convert.ToDateTime(dvRec["Date"]) <= dtCurrent && Convert.ToDateTime(dvRec["Date"]) >= dtCurrent.Subtract(TimeSpan.FromDays(360)))
{
cStockout[2]++;
}
}
else if (balanceAmount > maxcon)
{
//For Over stock
if (Convert.ToDateTime(dvRec["Date"]) <= dtCurrent && Convert.ToDateTime(dvRec["Date"]) >= dtCurrent.Subtract(TimeSpan.FromDays(90)))
{
cOverStock[0]++;
}
else if (Convert.ToDateTime(dvRec["Date"]) <= dtCurrent && Convert.ToDateTime(dvRec["Date"]) >= dtCurrent.Subtract(TimeSpan.FromDays(180)))
{
//.........这里部分代码省略.........
示例2: dtTo_ValueChanged
private void dtTo_ValueChanged(object sender, EventArgs e)
{
ReceiveDoc rec = new ReceiveDoc();
dtFrom.CustomFormat = "MM/dd/yyyy";
dtTo.CustomFormat = "MM/dd/yyyy";
DateTime dteFrom = ConvertDate.DateConverter(dtFrom.Text);
DateTime dteTo = ConvertDate.DateConverter(dtTo.Text);
DataTable dtRec = dteFrom < dteTo
? rec.GetTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dteFrom, dteTo)
: rec.GetAllTransaction(Convert.ToInt32(cboStores.EditValue));
gridReceives.DataSource = dtRec;
dtFrom.CustomFormat = "MMMM dd, yyyy";
dtTo.CustomFormat = "MMMM dd, yyyy";
}
示例3: dtTo_ValueChanged
private void dtTo_ValueChanged(object sender, EventArgs e)
{
if (_isReady)
{
ReceiveDoc rec = new ReceiveDoc();
dtFrom.CustomFormat = "MM/dd/yyyy";
dtTo.CustomFormat = "MM/dd/yyyy";
DateTime dteFrom = new DateTime();
DateTime dteTo = new DateTime();
dteFrom = ConvertDate.DateConverter(dtFrom.Text);
dteTo = ConvertDate.DateConverter(dtTo.Text);
DataTable dtRec = new DataTable();
if (dteFrom < dteTo)
{
dtRec = rec.GetTransactionByDateRange(Convert.ToInt32(cboStores.EditValue), dteFrom, dteTo);
}
else
{
dtRec = rec.GetAllTransaction(Convert.ToInt32(cboStores.EditValue));
}
PopulateTransactions(dtRec);
}
}