public WayBillRoute(DataRow row) { int id; int.TryParse(row[0].ToString(), out id); ID = id; int idWayBillDay; int.TryParse(row[1].ToString(), out idWayBillDay); WayBillDay = WayBillDayList.getInstance().getItem(idWayBillDay); MyPointList myPointList = MyPointList.getInstance(); int idMyPoint1; int.TryParse(row[2].ToString(), out idMyPoint1); MyPoint myPoint1 = myPointList.getItem(idMyPoint1); int idMyPoint2; int.TryParse(row[3].ToString(), out idMyPoint2); MyPoint myPoint2 = myPointList.getItem(idMyPoint2); string distance = row[4].ToString(); Route = new Route(myPoint1, myPoint2, distance); }
public override void Save() { ID = Convert.ToInt32(_provider.Insert("WayBillDay", ID, Car.ID, Driver.ID, _date)); WayBillDayList wayBillDayList = WayBillDayList.getInstance(); wayBillDayList.Add(this); }
private void LoadWayBillDay() { WayBillDayList wayBillDayList = WayBillDayList.getInstance(); foreach (var item in wayBillDayList.getList(_car, _date)) { _list.Add(item.Date.Day, item); //wayBillDayList.getList(_car, _date); } }