public BuyRecordRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, BuyRecords>(); lss = _context.BuyRecords.Include(a => a.Buy).Include(a => a.AfterBuyExpencess).ToList(); lss.ForEach(async r => await AddBuyRecords(r)); }
public IncomeRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Income>(); lss = _context.Income.ToList(); lss.ForEach(async r => await AddIncome(r)); }
public CapitalshareRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, CapitalShare>(); lss = _context.CapitalShare.ToList(); lss.ForEach(a => addcc(a)); }
public carInfo() { _context = new CarMangerContext(); Persons = new Dictionary <int, BUYACARINFO>(); lss = _context.BuyRecords.Include(a => a.AfterBuyExpencess).Include(a => a.Buy).Include(a => a.Outcome).Include(a => a.Partner).Select(a => new BUYACARINFO() { CarOwener = a.Buy.Car.Owener, CarID = a.Buy.Car.CarId, cashes = a.Outcome.Cash, checks = a.Outcome.Check, DateOfBuy = a.Buy.Date, IdPhoto = a.Buy.Customer.IdPhoto, IDNumber = a.Buy.Customer.Idnumber, Insurance = a.Buy.Car.Insurance, ManufactureName = a.Buy.Car.Model.Manufacture.Name, ModelName = a.Buy.Car.Model.Name, moreDetails = a.Buy.Car.MoreDetails, PriceOutcome = a.Outcome.Price, SaleAdress = a.Buy.Customer.Adress, SaleName = a.Buy.Customer.Name, SalePhone = a.Buy.Customer.Phone, caridd = a.Buy.CarId }).ToList(); lss.ForEach(r => AddBuyRecords(r)); }
public CustomerRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Customer>(); lss = _context.Customer.ToList(); lss.ForEach(async r => await AddCustomer(r)); }
public AfterSellExpencessRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, AfterSellExpncess>(); lss = _context.AfterSellExpncess.OrderBy(a => a.Date).ToList(); lss.ForEach(action: async r => await AddAfterSellExpncess(r)); }
public SalepersonRepos() { _context = new CarMangerContext(); Persons = new Dictionary <int, SalePerson>(); lss = _context.SalePerson.ToList(); lss.ForEach(async r => await AddSalePerson(r)); }
public SellRecordRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, SellRecords>(); lss = _context.SellRecords.Include(a => a.AfterSellExpncess).Include(a => a.Sale).ToList(); lss.ForEach(async r => await AddsellRecords(r)); }
public ModelRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Model>(); lss = _context.Model.ToList <Model>(); lss.ForEach(async r => await AddModel(r)); }
public CashRepo(UserManager <IdentityUser> userManager) { cc = new callproc(); _userManager = userManager; _context = new CarMangerContext(); Persons = new Dictionary <int, Cash>(); lss = _context.Cash.ToList(); lss.ForEach(async r => await AddCashAsync(r)); }
public CheckRepo(IHostingEnvironment hostingEnvironment) { cc = new callproc(); this._hostingEnvironment = hostingEnvironment; _context = new CarMangerContext(); Persons = new Dictionary <int, Check>(); lss = _context.Check.ToList(); lss.ForEach(r => AddCheck(r)); }
public ManufactureRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Manufacture>(); lss = _context.Manufacture.Include(c => c.Model). Select(b => new Manufacture { Id = b.Id, Name = b.Name, Model = b.Model.ToList() }).ToList <Manufacture>(); lss.ForEach(r => AddManufacture(r)); }
public BuyRepos() { _context = new CarMangerContext(); Persons = new Dictionary <int, Buy>(); lss = _context.Buy.OrderBy(i => i.Id).Include(c => c.BuyRecords).Include(a => a.Car).Include(b => b.BuyRecords).Include(d => d.Customer).Select(y => new Buy { Id = y.Id, Customer = y.Customer, BuyRecords = y.BuyRecords, Car = y.Car, CarId = y.CarId, CustomerId = y.CustomerId, Date = y.Date }).ToList(); lss.ForEach(async r => await AddBuy(r)); }
public SaleRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Sale>(); lss = _context.Sale.OrderBy(i => i.Id).Include(c => c.SellRecords).Include(a => a.Car).Include(d => d.Customer).Select(y => new Sale { Car = y.Car, SellRecords = y.SellRecords, CarId = y.CarId, Commission = y.Commission, Customer = y.Customer, CustomerId = y.CustomerId, Date = y.Date, Id = y.Id }).ToList(); lss.ForEach(async r => await Addsale(r)); }
public CarRepo() { _context = new CarMangerContext(); Persons = new Dictionary <int, Car>(); lss = _context.Car.AsNoTracking().OrderBy(i => i.Id).Include(a => a.Model.Manufacture).Include(a => a.Model).Include(b => b.Buy).Include(e => e.Sale).Select(y => new Car { Id = y.Id, Buy = y.Buy, Sale = y.Sale, CarId = y.CarId, Model = y.Model, Insurance = y.Insurance, ModelId = y.ModelId, MoreDetails = y.MoreDetails, Owener = y.Owener, Sold = y.Sold }); lss.ToList().ForEach(async r => await AddCar(r)); }