public string GetStatus() { DTPList dtpList = DTPList.getInstance(); DTP dtp = dtpList.GetLast(this); StatusAfterDTPs statusAfterDTPs = StatusAfterDTPs.getInstance(); string statusAfterDTP = statusAfterDTPs.getItem(Convert.ToInt32(dtp.IDStatusAfterDTP)); CarSaleList carSaleList = CarSaleList.getInstance(); CarSale carSale = carSaleList.getItem(ID); if (info.IsSale && carSale.Date != string.Empty) { return("продан"); } if (info.IsSale) { return("на продажу"); } if (!this.IsGet) { return("покупка"); } if (statusAfterDTP == "А/м НЕ на ходу") { return("в ремонте"); } return("на ходу"); }
internal override object[] getRow() { Regions regions = Regions.getInstance(); Culprits culpritList = Culprits.getInstance(); StatusAfterDTPs statusAfterDTP = StatusAfterDTPs.getInstance(); Driver driver = GetDriver(); if (driver == null) { driver = new Driver(); } return(new object[] { ID, Car.ID, Car.BBNumber, Car.Grz, Number, Date, regions.getItem(_idRegion), driver.GetName(NameType.Full), _dateCallInsure, GetCurrentStatusAfterDTP(), culpritList.getItem(_idCulprit), _sum, Comm, Facts, Damage, statusAfterDTP.getItem(_idStatusAfterDTP), NumberLoss }); }