public frmStocks() { _errorLogs = new ErrorLogs(); _repoProduct = new ProductRepo(); _repoStock = new StockRepo(); InitializeComponent(); }
public FrmStock(DateTime startDate, DateTime endDate, bool isPurchase) { try { InitializeComponent(); grdViewStock.AutoGenerateColumns = false; _repository = new StockRepo(); _startDate = startDate; _endDate = endDate; var listStk = _repository.GetAllStocksByDate(startDate, endDate, isPurchase); BindingList <Stock> newlist = new BindingList <Stock>(listStk); grdViewStock.DataSource = newlist; _isPurchase = isPurchase; if (isPurchase == true) { lblTitle.Text = "Stock In"; } else { lblTitle.Text = "Stock Out"; } btnPrint.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public UsersController(DataBaseContext db) { _db = db; _stockFactory = new StockFactory(); _userFactory = new UserFactory(); _userRepo = new UserRepo(db); _stockRepo = new StockRepo(db); }
public frmInvoice() { _errorLogs = new ErrorLogs(); _repoProduct = new ProductRepo(); _repoInvoice = new InvoiceRepo(); _repoStock = new StockRepo(); _vmInvoice = new InvoiceViewModel(); InitializeComponent(); }
internal PurchaseModule() { purchaseInvoiceRepo = new PurchaseInvoiceRepo(); purchaseInvoiceDetailRepo = new PurchaseInvoiceDetailRepo(); purchaseInvoiceDetailsTempRepo = new PurchaseInvoiceDetailsTempRepo(); globalSettingRepo = new GlobalSettingRepo(); stockLogRepo = new StockLogRepo(); stockRepo = new StockRepo(); }
internal StockAdjustmentModule() { stockAdjustmentRepo = new StockAdjustmentRepo(); stockAdjustmentDetailRepo = new StockAdjustmentDetailRepo(); stockAdjustmentDetailsTempRepo = new StockAdjustmentDetailsTempRepo(); globalSettingRepo = new GlobalSettingRepo(); stockRepo = new StockRepo(); stockLogRepo = new StockLogRepo(); }
internal SaleModule() { saleInvoiceRepo = new SaleInvoiceRepo(); saleInvoiceDetailRepo = new SaleInvoiceDetailRepo(); saleInvoiceDetailsTempRepo = new SaleInvoiceDetailsTempRepo(); saleInvoicePaymentRepo = new SaleInvoicePaymentRepo(); globalSettingRepo = new GlobalSettingRepo(); stockLogRepo = new StockLogRepo(); stockRepo = new StockRepo(); }
public FrmStock(bool isPurchase) { InitializeComponent(); _repository = new StockRepo(); tempStk = new Stock(); _isPurchase = isPurchase; grdViewStock.AutoGenerateColumns = false; BindingList <Stock> newlist = new BindingList <Stock>(); grdViewStock.DataSource = newlist; if (isPurchase == true) { lblTitle.Text = "Stock In"; } else { lblTitle.Text = "Stock Out"; } }
public StockyDataService() { if (Helpers.DBIdentification) { Stocky.DataAcesse.DataBase.DBConnection.Set("LocalHost", "Stocky"); } else { Stocky.DataAcesse.DataBase.DBConnection.Set(@"7TECH-SVR1", "Stocky_LIVE", "applogin", "728652Hotdog"); } StockRepo = new StockRepo(); TransactionRepo = new TransactionRepo(); AddressRepo = new AddressRepo(); CatergoryRepo = new CategoryRepo(); PersonRepo = new PersonRepo(); UserRepo = new UserRepo(); ValueRepo = new ValueBandRepo(); VendorRepo = new VendorRepo(); ValidationRepo = new ValidationRepo(); }
private void btnAddProduct_Click(object sender, EventArgs e) { try { decimal quantity = 0; if (radIsBulk.Checked) { quantity = Convert.ToDecimal(Convert.ToDecimal(txtQuantity.Text) * Convert.ToInt32(txtSinglesInBulk.Text)); } else { quantity = Convert.ToDecimal(txtQuantity.Value); } for (int i = 0; i <= 3; i++) { if (i == 1) { if (ValidateForm() == true) { int update = ProductRepo.AddProducts(txtBQNum.Text, Convert.ToInt32(quantity), Convert.ToDecimal(txtUnitPrice.Text));//this version of AddProducts(x,x,x,x) taking 4 params if actually for updating the products tab if the product BQ already exists. if (update > 0) { continue; } else { int ins = ProductRepo.AddProducts(txtBQNum.Text, txtProductNames.Text, Convert.ToInt32(quantity), Convert.ToInt32(txtSinglesInBulk.Text), Convert.ToDecimal(txtBulkPrice.Text), Convert.ToDecimal(txtUnitPrice.Text), txtDescription.Text, Convert.ToInt32(txtLowAlert.Text));//AddProducts(x,x,x,x,x,x,x,x,x,x,x) taking 11 params actually add the products to the database if its BQ doesnt exist in the database if (ins <= 0) { lblError.Text = "Error while inserting product"; break; } else { continue; } } } else { lblError.Text = "Error in data entry"; } break; } if (i == 2) { string bulkType;; if (radIsBulk.Checked) { bulkType = cboBulkType.Text; } else { bulkType = "single"; } lblError.Text = "Managing Stock..."; int stockInsert = StockRepo.AddStock(txtBQNum.Text, Convert.ToInt32(txtQuantity.Value), Convert.ToDecimal(txtUnitPrice.Text), txtDescription.Text, bulkType, Convert.ToDateTime(dtpExpiryDate.Text));//Making the next loop phase add and manage stock if (stockInsert > 0) { continue; } else { lblError.Text = "Error adding stock"; break; } } if (i > 2) { timer1.Enabled = true; lblError.Text = "Product added and stock updated"; ClearForm(); } } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
public FrmStock() { InitializeComponent(); _repository = new StockRepo(); tempStk = new Stock(); }
public StockDetails() { InitializeComponent(); _objStock = new StockRepo(); }