public MainStockInSearchReportForm() { InitializeComponent(); /* dataTable.Columns.Add("Mã lô"); dataTable.Columns.Add("Ngày nhập"); dataTable.Columns.Add("Tổng số lượng nhập"); dataTable.Columns.Add("Người nhập");*/ stockInDetList = new StockInDetailCollection(bdsStockIn); bdsStockIn.DataSource = stockInDetList; }
private void frmStockinStatistic_Load(object sender, EventArgs e) { pSODetResultList = new StockInResultDetailCollection(bdsStockInResultPM); bdsStockInResultPM.DataSource = pSODetResultList; pSODetList = new StockInDetailCollection(bdsStockInResultDetail); bdsStockInResultDetail.DataSource = pSODetList; dgvStockProductsDetail.Columns[1].DefaultCellStyle.Format = "dd/MM/yyyy hh:mm:ss"; }
private void DepartmentStockInExtra_Load(object sender, EventArgs e) { deptSIDetailList = new StockInDetailCollection(bdsStockIn); bdsStockIn.DataSource = deptSIDetailList; dgvDeptStockIn.DataError += new DataGridViewDataErrorEventHandler(dgvDeptStockIn_DataError); // create DepartmentStockIn if (deptSI == null) { deptSI = new StockIn(); deptSI.CreateDate = DateTime.Now; deptSI.UpdateDate = DateTime.Now; deptSI.CreateId = ClientInfo.getInstance().LoggedUser.Name; deptSI.UpdateId = ClientInfo.getInstance().LoggedUser.Name; deptSI.ExclusiveKey = 0; CreateNewStockInDetail(); btnBarcode.Visible = false; numericUpDownBarcode.Visible = false; btnPreview.Visible = false; } else { btnBarcode.Visible = true; numericUpDownBarcode.Visible = true; btnPreview.Visible = true; IList deptStockInDetails = deptSI.StockInDetails; foreach (StockInDetail detail in deptStockInDetails) { if (detail.DelFlg == CommonConstants.DEL_FLG_NO) { deptSIDetailList.Add(detail); detail.OldQuantity = detail.Quantity; } } for (int i = 0; i < dgvDeptStockIn.Columns.Count; i++) { dgvDeptStockIn.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable; if (i != QUANTITY_POS && i != PRICE_POS && i != SELL_PRICE_POS) { dgvDeptStockIn.Columns[i].ReadOnly = true; } } txtDexcription.Text = deptSI.Description; txtStockInId.Text = deptSI.StockInId; CalculateTotalStorePrice(); } deptSI.StockInDetails = ObjectConverter.ConvertToNonGenericList<StockInDetail>(deptSIDetailList); }