private void updateBtn_Click(object sender, EventArgs e) { if (this.textBox1.Text == "" || this.textBox2.Text == "") { MessageBox.Show("Insert the data"); } else { EmployeeR i = new EmployeeR(); i.EmployeeId = this.textBox1.Text; i.Salary = Convert.ToInt32(this.textBox2.Text); FinanceRepository f = new FinanceRepository(); if (f.Update(i)) { List <EmployeeR> iList = f.GetAllEmployee(); this.dataGrid.DataSource = iList; List <EmployeeR> allResult = f.GetAllEmployee(); this.textBox1.Text = ""; this.textBox2.Text = ""; } else { MessageBox.Show("Can Not Update Employee", "Update Error"); } } }
private void PurUpdateBtn_Click_1(object sender, EventArgs e) { if (this.textBox5.Text == "" || this.textBox6.Text == "") { MessageBox.Show("Insert data"); } else { InventoryR i = new InventoryR(); i.ProductId = this.textBox5.Text; i.Price = Convert.ToInt32(this.textBox6.Text); FinanceRepository f = new FinanceRepository(); if (f.UpdatePrice(i)) { List <InventoryR> iList = f.GetAllProduct(); this.dataGrid3.DataSource = iList; this.textBox5.Text = ""; this.textBox6.Text = ""; } else { MessageBox.Show("Can Not Update Price", "Update Error"); } } }
private void UpdateMK_Click(object sender, EventArgs e) { if (this.textBox3.Text == "" || this.textBox4.Text == "") { MessageBox.Show("Insert data"); } else { MarketingR i = new MarketingR(); i.CampaignId = Convert.ToInt32(this.textBox3.Text); i.Budget = Convert.ToInt32(this.textBox4.Text); FinanceRepository fr = new FinanceRepository(); if (fr.UpdateBudget(i)) { MarketingRepository mr = new MarketingRepository(); List <MarketingR> iList = mr.GetAllApprovedCampaignAnd(); this.dataGrid2.DataSource = iList; this.textBox3.Text = ""; this.textBox4.Text = ""; } else { MessageBox.Show("Insufficient Balance"); // MessageBox.Show("Can Not Update Campaign", "Update Error"); } } }
public AssetEntryUnitOfWork(AssetDbContext context) { _context = context; AssetEntry = new AssetEntryRepository(_context); Finance = new FinanceRepository(_context); ServiceOrRepairing = new ServiceOrRepairingRepository(_context); Note = new NoteRepository(_context); Attchment = new AttachmentRepository(_context); }
private void bunifuFlatButton3_Click(object sender, EventArgs e) { this.groupBox1.Visible = true; this.groupBox2.Visible = false; this.groupBox3.Visible = false; this.groupBox4.Visible = false; this.dataGrid.Visible = true; this.dataGrid2.Visible = false; this.dataGrid3.Visible = false; FinanceRepository f = new FinanceRepository(); List <EmployeeR> allResult = f.GetAllEmployee(); this.dataGrid.DataSource = allResult; }
public FinanceController(AppDbContext context, ILogger <FinanceController> logger, FinanceRepository repository) : base(context, logger) { _context = context; _logger = logger; _repository = repository; }
/// <summary> /// ctor /// </summary> /// <param name="financeRepository"></param> /// <param name="mapper"></param> public FinanceService(FinanceRepository financeRepository) : base(financeRepository) { _financeRepository = financeRepository; }
public ShopController(FinanceRepository financeRepo, IDocumentStore documentStore) { _financeRepo = financeRepo; _documentStore = documentStore; } //Todo: crear una nueva base de datos exclusiva para Finance.
public FinanceUnitOfWork(AssetDbContext context) { _context = context; Finance = new FinanceRepository(_context); }
/// <summary> /// ctor /// </summary> /// <param name="financeRepository"></param> /// <param name="mapper"></param> public FinanceService(FinanceRepository financeRepository, IMapper mapper) : base(financeRepository) { _mapper = mapper; _financeRepository = financeRepository; }