public UserRepository(LogisticDbContext context, VendorsDriverMapRepository repository, SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager) { _context = context; _vendorDriverMapRepository = repository; _signInManager = signInManager; _userManager = userManager; }
public static void Update(DataGridView dataGridView1) { using (LogisticDbContext dbContext = new LogisticDbContext()) { object obj = dataGridView1.CurrentRow.DataBoundItem; dbContext.Entry(obj).State = EntityState.Modified; dbContext.Update(obj); dbContext.SaveChanges(); } }
public DriversController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IUserRepository userRepository, INotificationService notificationService, VendorsDriverMapRepository vendorsDriverRepository, LogisticDbContext db) { _userManager = userManager; _signInManager = signInManager; _userRepository = userRepository; _notifictionService = notificationService; _vendorDriverMapRepository = vendorsDriverRepository; _db = db; }
private void ReportForm_Load(object sender, EventArgs e) { LogisticDbContext dbContext = new LogisticDbContext(); var data = from t1 in dbContext.Quotations join t2 in dbContext.Quotation_Items on t1.Q_ID equals t2.Q_ID join t3 in dbContext.Companies on t1.Company_ID equals t3.C_ID join t4 in dbContext.Items on t2.Item_ID equals t4.I_ID where t1.Q_ID == id select new ItemViewModel { Name = t4.Name, Unit = t4.Unit, Description = t4.Description, Code = t4.Code, Category = t1.Q_No, Quantity = t2.Quantity, Quoted_Amount = t2.Quoted_Amount, Total = t2.Quantity * t2.Quoted_Amount, Company = t3.C_Name } ; var reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); reportDataSource1.Name = "DataSet1"; reportDataSource1.Value = data.ToList(); this.reportViewer1.LocalReport.DataSources.Add(reportDataSource1); var reportDataSource2 = new Microsoft.Reporting.WinForms.ReportDataSource(); reportDataSource2.Name = "DataSet2"; reportDataSource2.Value = dbContext.Quotations.ToList(); this.reportViewer1.LocalReport.DataSources.Add(reportDataSource2); this.reportViewer1.LocalReport.ReportPath = @"C:\Users\Zakir Awan\Source\Repos\LogisticApp\LogisticAppUI\Report\QuotationReport.rdlc"; //this.reportViewer1.LocalReport.ReportEmbeddedResource = "QuotationReport.rdlc"; this.reportViewer1.RefreshReport(); }
public CompanyForm() { InitializeComponent(); dataGridView1.Anchor = (AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom); dbContext = new LogisticDbContext(); Refresh(); dataGridView1.Columns[0].Visible = false; dataGridView1.Columns[1].HeaderText = "Name"; dataGridView1.Columns[2].HeaderText = "Address"; dataGridView1.Columns[3].HeaderText = "Contact"; DataGridViewButtonColumn col = new DataGridViewButtonColumn(); col.UseColumnTextForButtonValue = true; col.Text = "Delete"; col.Name = "Delete"; dataGridView1.Columns.Add(col); dataGridView1.Columns[dataGridView1.Columns.Count - 2].Visible = false; dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellContentClick); }
public StocksGatewayDb(LogisticDbContext context) { _context = context; }
public ErrorLogRepository(LogisticDbContext context) : base(context) { _context = context; }
public IndustryTypeRepository(LogisticDbContext context) : base(context) { _context = context; }
public RepositoryBase() { _Context = new LogisticDbContext(); }
public CompanySizeRepository(LogisticDbContext context) : base(context) { _context = context; }
public CountryRepository(LogisticDbContext context) : base(context) { _context = context; }
public ProductsGatewayDb(LogisticDbContext context) { _context = context; }
public VendorsDriverMapRepository(LogisticDbContext context) : base(context) { _context = context; }
public WorkersGatewayDb(LogisticDbContext context) { _context = context; }
public OrderRepository(LogisticDbContext context) : base(context) { _context = context; }
public BaseRepository(LogisticDbContext context) { this.context = context; this.dbSet = context.Set <T>(); }