本文整理汇总了C#中BLL.ReceiveDoc.CountNeverReceivedItemsByCateogryAndYear方法的典型用法代码示例。如果您正苦于以下问题:C# ReceiveDoc.CountNeverReceivedItemsByCateogryAndYear方法的具体用法?C# ReceiveDoc.CountNeverReceivedItemsByCateogryAndYear怎么用?C# ReceiveDoc.CountNeverReceivedItemsByCateogryAndYear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.ReceiveDoc
的用法示例。
在下文中一共展示了ReceiveDoc.CountNeverReceivedItemsByCateogryAndYear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateSStatusByCategoryAndYearForAllStore
private void PopulateSStatusByCategoryAndYearForAllStore()
{
if (curMont != 0 && curYear != 0)
{
curYear = Convert.ToInt32(cboYear.EditValue);
Balance blnc = new Balance();
DataTable dtbl = blnc.GetSOHForAllStores(curMont, curYear);
Items itm = new Items();
Balance bal = new Balance();
ReceiveDoc rec = new ReceiveDoc();
Programs prog = new Programs();
prog.GetProgramByName("Family Planning");
DataTable dtItm = itm.GetItemsByProgram(prog.ID);
int totalECLS = dtItm.Rows.Count;
lblNoECLS.Text = totalECLS.ToString();
int neverRec = rec.CountNeverReceivedItemsByCateogryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue));
int stockin = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Normal" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked)? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (stockin == 0)
{
listInStock.Visible = false;
}
else
{
listInStock.Visible = true;
}
//progressBar1.PerformStep();
int stockout = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Stock Out" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (stockout == 0)
{
listStockOut.Visible = false;
}
else
{
listStockOut.Visible = true;
}
//((ckExclude.Checked)? (bal.CountStockOut(storeId, curMont, curYear)- neverRec) : bal.CountStockOut(storeId, curMont, curYear));
//progressBar1.PerformStep();
int overstock = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Over Stocked" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (overstock == 0)
{
listOverstock.Visible = false;
}
else
{
listOverstock.Visible = true;
}
// progressBar1.PerformStep();
int nearEOP = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Near EOP" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (nearEOP == 0)
{
listNearEOP.Visible = false;
}
else
{
listNearEOP.Visible = true;
}
//progressBar1.PerformStep();
int belowEOP = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Below EOP" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (belowEOP == 0)
{
listBelowEOP.Visible = false;
}
else
{
listNearEOP.Visible = true;
}
// progressBar1.PerformStep();
int belowMin = 0;//bal.CountBelowMin(storeId, curMont, curYear);
// progressBar1.PerformStep();
int freeStockOut = (from m in dtbl.AsEnumerable()
where m["Status"].ToString() == "Stock Out" && Convert.ToInt32(m["TypeID"]) == Convert.ToInt32(lkCategory.EditValue)
&& ((ckExclude.Checked) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).Count();
if (freeStockOut == 0)
{
lblFreeStockedout.Visible = false;
}
else
{
lblFreeStockedout.Visible = true;
}
//.........这里部分代码省略.........
示例2: PopulateStockStatusByYearForAllStore
private void PopulateStockStatusByYearForAllStore()
{
// progressBar1.Visible = true;
if (curMont != 0 && curYear != 0)
{
IssueDoc iss = new IssueDoc();
ReceiveDoc rec = new ReceiveDoc();
Balance blnc = new Balance();
DataTable dtbl = blnc.GetSOHForAllStores(curMont, curYear);
DateTime lastRec = rec.GetLastReceivedDateByCategoryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue));
DateTime lastIss = iss.GetLastIssuedDateByCategoryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue));
//time here
TimeSpan tt = new TimeSpan();
string noDays = "";
tt = new TimeSpan(dtCurrent.Ticks - lastRec.Ticks);
noDays = (tt.TotalDays < 30000) ? tt.TotalDays.ToString() + " Days" : "Never";
lblLastReceived.Text = (tt.TotalDays < 30000) ? lastRec.ToString("MM dd,yyyy") : "Never";
lblRecDays.Text = noDays;
//progressBar1.PerformStep();
tt = new TimeSpan(dtCurrent.Ticks - lastIss.Ticks);
noDays = (tt.TotalDays < 30000) ? tt.TotalDays.ToString() + " Days" : "Never";
lblLastIssued.Text = (tt.TotalDays < 30000) ? lastIss.ToString("MM dd,yyyy") : "Never";
lblIssuedDays.Text = noDays;
DataTable dtAllItems;
try
{
dtAllItems = (from m in dtbl.AsEnumerable()
where ((ckExclude.Checked == true) ? Convert.ToInt32(m["EverReceived"]) == 1 : true)
select m).CopyToDataTable();
}
catch (InvalidOperationException)
{
dtAllItems = null;
}
PopulateList(dtAllItems, listStatused);
DataTable dtRec = rec.GetTopReceivedItemsByCategoryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue));
// groupRecSummary.Text = "Top 10 Most Received Items";
PopulateList(dtRec, listReceiveSum);
lblNeverRecived.Text = rec.CountNeverReceivedItemsByCateogryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue)).ToString();
if (rec.CountNeverReceivedItems(storeId) == 0)
{
linkLabel10.Visible = false;
}
else
{
linkLabel10.Visible = true;
}
lblNeverIssued.Text = rec.CountReceivedNotIssuedItemsByCategoryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue)).ToString();
if (lblNeverIssued.Text == "0")
{
linkLabel21.Visible = false;
}
else
{
linkLabel21.Visible = true;
}
// progressBar1.PerformStep();
DataTable dtIss = iss.GetTopIssuedItemsByCategoryAndYear(storeId, Convert.ToInt32(lkCategory.EditValue), Convert.ToInt32(cboYear.EditValue));
// groupIssued.Text = "Top 10 Most Issued Items";
PopulateList(dtIss, listIssued);
//Balance bal = new Balance();
GeneralInfo info = new GeneralInfo();
info.LoadAll();
DataTable dtList = new DataTable();
DataTable dtCons = new DataTable();
string[] co = { "Ham", "Neh", "Mes", "Tek", "Hed", "Tah", "Tir", "Yek", "Meg", "Miz", "Gen", "Sen" };
//foreach(string s in co)
//{
dtList.Columns.Add("Month");
dtList.Columns.Add("Value");
dtList.Columns[1].DataType = typeof(Int64);
dtCons.Columns.Add("Month");
dtCons.Columns.Add("Value");
dtCons.Columns[1].DataType = typeof(Int64);
int[] mon = { 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
double[] cos = new double[12];
DataTable dtBal = new DataTable();
Items recd = new Items();
//time here
int year = dtCurrent.Year;
chartReceiveCost.Series.Clear();
Series ser = new Series("Received Cost In Birr", ViewType.Line);
ser.DataSource = dtList;
ser.ArgumentScaleType = ScaleType.Qualitative;
ser.ArgumentDataMember = "Month";
ser.ValueScaleType = ScaleType.Numerical;
//.........这里部分代码省略.........