private void populateGridSummary() { DataTable dt = gridDetail.DataSource as DataTable; gridSummaryCheck.DataSource = InventoryItemCheck.compileSummaryData(dt); //Inventory.setCount(lblTotalCounts, dt.Rows.Count.ToString(), dt.Compute(String.Format("SUM({0})", InventoryItem.COL_LENGTH), "").ToString()); }
private void btnCompareToInventory_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; chkIgnoreSold.Checked = false; populateGridDetail(); col_gridSummary_inventory_code.DataPropertyName = Inventory.COL_DB_CODE; gridSummaryCheck.DataSource = filterCompleteSummary(InventoryItemCheck.compileCompleteData(((DataView)gridDetail.DataSource).Table).DefaultView); Cursor.Current = Cursors.Default; }
private void btnDeleteTodayData_Click(object sender, EventArgs e) { if (LIBUtil.Util.displayMessageBoxYesNo("Are you sure?")) { InventoryItemCheck.deleteTodayData(); populateGridDetail(); dgvSummary.DataSource = null; } txtBarcode.Focus(); }
private void setupControls() { Settings.setGeneralSettings(this); InventoryItemCheck.CheckCleanup(); Grade.populateInputControlCheckedListBox(iclb_Grades, false); lblMessage.Text = ""; in_Floor.Enabled = false; in_Rack.Enabled = false; in_Row.Enabled = false; in_Column.Enabled = false; gridDetail.AutoGenerateColumns = false; col_gridDetails_inventoryItemID.DataPropertyName = InventoryItemCheck.COL_DB_INVENTORYITEMID; col_gridDetails_itemsellprice.DataPropertyName = InventoryItemCheck.COL_TAGPRICE; col_gridDetail_OpnameMarker.DataPropertyName = InventoryItemCheck.COL_OPNAMEMARKER; col_gridDetail_ItemLocation.DataPropertyName = InventoryItemCheck.COL_DB_ItemLocation; col_gridDetail_inventory_Id.DataPropertyName = InventoryItemCheck.COL_INVENTORYID; gridSummaryCheck.AutoGenerateColumns = false; col_gridSummary_inventoryID.DataPropertyName = InventoryItemCheck.COL_INVENTORYID; dgvSummary.AutoGenerateColumns = false; dgvSummary.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_dgvSummary_code.DataPropertyName = "code"; col_dgvSummary_color_name.DataPropertyName = "color_name"; col_dgvSummary_grade_name.DataPropertyName = "grade_name"; col_dgvSummary_length_unit_name.DataPropertyName = "length_unit_name"; col_dgvSummary_product_store_name.DataPropertyName = "product_store_name"; col_dgvSummary_product_width_name.DataPropertyName = "product_width_name"; col_dgvSummary_total_length.DataPropertyName = "total_item_length"; col_dgvSummary_total_qty.DataPropertyName = "total_item_qty"; gridMissingItems.AutoGenerateColumns = false; gridMissingItems.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_gridMissingItems_InventoryDate.DataPropertyName = "inventory_receivedate"; col_gridMissingItems_InventoryCode.DataPropertyName = "inventory_code"; col_gridMissingItems_Inventory_Id.DataPropertyName = "inventory_id"; col_gridMissingItems_Barcode.DataPropertyName = "barcode"; col_gridMissingItems_ColorName.DataPropertyName = "color_name"; col_gridMissingItems_GradeName.DataPropertyName = "grade_name"; col_gridMissingItems_UnitName.DataPropertyName = "length_unit_name"; col_gridMissingItems_ProductName.DataPropertyName = "product_store_name"; col_gridMissingItems_ProductWidth.DataPropertyName = "product_width_name"; col_gridMissingItems_ItemLength.DataPropertyName = "item_length"; col_gridMissingItems_LastOpname.DataPropertyName = "last_opname"; col_gridMissingItems_ItemLocation.DataPropertyName = "ItemLocation"; resetFilters(); createTooltip(chkCheckListBeforeSubmit, "Yang di scan akan di cek ke list barcode. Gunakan kalau opname lebih dari 1 hari."); }
private void addBarcode(bool isManualInput) { string barcodeInput = txtBarcode.Text; if (string.IsNullOrEmpty(barcodeInput)) { return; } else if (barcodeInput == BARCODE_RESET) { btnReset1.PerformClick(); txtBarcode.Text = ""; txtBarcode.Focus(); return; } string barcodeWithoutPrefix = InventoryItem.getBarcodeWithoutPrefix(barcodeInput); //in case opname span more than 1 day, the checkbox can be used to verify the barcode is not in the list of loaded scans from previous days if (chkCheckListBeforeSubmit.Checked) { DataView list = Util.getDataTable(gridDetail.DataSource).Copy().DefaultView; list.RowFilter = string.Format("{0} = '{1}'", InventoryItemCheck.COL_BARCODE, barcodeWithoutPrefix); if (list.Count > 0) { LIBUtil.Util.displayMessageBoxError("Sudah ada di list"); return; } } if (isManualInput) { Settings.nonBarcodeScannerSound.Play(); if (LIBUtil.Util.displayMessageBoxYesNo("Tidak terdeteksi menggunakan scanner. Coba lagi?")) { return; } } displayMessage(InventoryItemCheck.submitNew(barcodeWithoutPrefix, isManualInput, chkRescanToday.Checked, chkIgnoreSold.Checked, txtItemLocation.Text)); if (!chkDoNotLoadList.Checked) { populateGridDetail(); if (tcSummary.SelectedTab == tpSummary) { btnGenerateSummary.PerformClick(); } } txtBarcode.Text = ""; txtBarcode.Focus(); }
private void btnDeleteIgnoreSold_Click(object sender, EventArgs e) { if (LIBUtil.Util.displayMessageBoxYesNo("Are you sure?")) { InventoryItemCheck.deleteIgnoreSold(); gridDetail.DataSource = null; gridSummaryCheck.DataSource = null; lblTotalCounts.Text = ""; btnLoad1.PerformClick(); } txtBarcode.Focus(); }
/*******************************************************************************************************/ #region LIST private void populateGridDetail() { col_gridSummary_inventory_code.DataPropertyName = InventoryItem.COL_DB_INVENTORY_CODE; DataView dvwItems = InventoryItemCheck.getAll(Tools.getDateTime(dtpStartDate1, false), Tools.getDateTime(dtpEndDate1, true), chkAllUsers.Checked, chkIgnoreSold.Checked).DefaultView; gridDetail.DataSource = filterData(dvwItems); DataTable dt = dvwItems.ToTable(); Inventory.setCount(lblTotalCounts, dt.Rows.Count.ToString(), dt.Compute(String.Format("SUM({0})", InventoryItem.COL_DB_LENGTH), "").ToString()); if (!string.IsNullOrEmpty(lblTotalCounts.Text)) { lblTotalCounts.Text += string.Format(" ({0:N0} manual)", dt.Compute(String.Format("COUNT({0})", InventoryItem.COL_DB_LENGTH), InventoryItemCheck.COL_DB_MANUALINPUT + "=1")); } //populateGridSummary(); }
private void populateMissingInventoryItems() { gridMissingItems.DataSource = InventoryItemCheck.getMissing(Tools.getDate(dtpStartDate1, false), iclb_Grades.getCheckedItemsInArrayTable(Grade.COL_DB_ID)); }
private void btnGenerateSummary_Click(object sender, EventArgs e) { dgvSummary.DataSource = InventoryItemCheck.getSummary(Tools.getDateTime(dtpStartDate1, false), Tools.getDateTime(dtpEndDate1, true), chkAllUsers.Checked); txtBarcode.Focus(); }