/// <summary> /// Initiarize 12 months data. /// </summary> public static void Renew() { _monthItems.Clear(); SalesMonthModel prev = null; // there is no data for first month(january) for (byte month = 1; month <= 12; month++) { SalesMonthModel item = new SalesMonthModel(_dataContext, month, prev); _monthItems.Add(item); prev = item; // set the modified "item" data for previous month sales data of next month. } }
public static void Renew() { _monthItems.Clear(); SalesMonthModel prev = null; for (byte month = 1; month <= 12; month++) { SalesMonthModel item = new SalesMonthModel(month, prev); _monthItems.Add(item); prev = item; } }
public void renew() { var q = from p in _dataContext.Results where p.Date.Year == Years.Item && p.Date.Month == Month && p.SectionId == Sections.Item.id select p; _resultItems.Clear(); foreach (Result x in q) { _resultItems.Add(x); } }
public void Renew() { //todo: 未実装(Sales.SalesMonthModel.Renew()) //throw new System.NotImplementedException(); var q = from p in _dataContext.Results where p.Date.Year == Years.Item && p.Date.Month == Month && p.SectionId == Sections.Item.Id select p; _resultItems.Clear(); foreach (Result x in q) { _resultItems.Add(x); } }