Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 public IncomeRepo()
 {
     _context = new CarMangerContext();
     Persons  = new Dictionary <int, Income>();
     lss      = _context.Income.ToList();
     lss.ForEach(async r => await AddIncome(r));
 }
Esempio n. 3
0
 public CapitalshareRepo()
 {
     _context = new CarMangerContext();
     Persons  = new Dictionary <int, CapitalShare>();
     lss      = _context.CapitalShare.ToList();
     lss.ForEach(a => addcc(a));
 }
Esempio n. 4
0
 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));
 }
Esempio n. 5
0
 public CustomerRepo()
 {
     _context = new CarMangerContext();
     Persons  = new Dictionary <int, Customer>();
     lss      = _context.Customer.ToList();
     lss.ForEach(async r => await AddCustomer(r));
 }
Esempio n. 6
0
 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));
 }
Esempio n. 7
0
 public SalepersonRepos()
 {
     _context = new CarMangerContext();
     Persons  = new Dictionary <int, SalePerson>();
     lss      = _context.SalePerson.ToList();
     lss.ForEach(async r => await AddSalePerson(r));
 }
Esempio n. 8
0
 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));
 }
Esempio n. 9
0
        public ModelRepo()
        {
            _context = new CarMangerContext();
            Persons  = new Dictionary <int, Model>();
            lss      = _context.Model.ToList <Model>();

            lss.ForEach(async r => await AddModel(r));
        }
Esempio n. 10
0
 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));
 }
Esempio n. 11
0
 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));
 }
Esempio n. 12
0
        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));
        }
Esempio n. 13
0
 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));
 }
Esempio n. 14
0
 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));
 }
Esempio n. 15
0
 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));
 }