private void setupControls() { Settings.setGeneralSettings(this); Grade.populateDropDownList(cbGrades, false, true); ProductWidth.populateDropDownList(cbProductWidths, false, true); LengthUnit.populateDropDownList(cbLengthUnits, false, true); FabricColor.populateDropDownList(cbColors, false, true); VendorInvoice.populateDropDownList(cbVendorInvoices, true); //set window title switch (_formMode) { case FormMode.New: this.Text = "ADD NEW INVENTORY"; lblCode.Visible = false; txtCode.Visible = false; break; case FormMode.Update: this.Text = "UPDATE INVENTORY"; break; } if (GlobalData.UserAccount.role == Roles.User) { lblBuyPrice.Visible = false; txtBuyPrice.Visible = false; this.Height -= 60; } }
private void setupControls() { Settings.setGeneralSettings(this); ProductStoreName.populateDropDownList(cbProductStoreNames, false, false); Grade.populateDropDownList(cbGrades, false, false); ProductWidth.populateDropDownList(cbProductWidths, false, false); LengthUnit.populateDropDownList(cbLengthUnits, false, false); FabricColor.populateDropDownList(cbColors, false, false); grid.AutoGenerateColumns = false; grid.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_grid_colorname.DataPropertyName = ProductPrice.COL_COLORNAME; col_grid_Checked.DataPropertyName = ProductPrice.COL_DB_Checked; col_grid_BuyPrice.DataPropertyName = ProductPrice.COL_DB_BuyPrice; if (GlobalData.UserAccount.role != Roles.Super) { col_grid_Checked.Visible = false; chkOnlyNotOK.Visible = false; in_BuyPrice.Visible = false; col_grid_BuyPrice.Visible = false; btnDelete.Enabled = false; } }
public AddProcessSequenceDialog(Fabric fabric, FabricColor fabricColor, Dictionary <int, ObservableCollection <ProcessSequenceDetail> > processSequenceListGroup) { InitializeComponent(); _fabric = fabric; _fabricColor = fabricColor; LabelTextileID.Content = fabric.FabricID; LabelTextileName.Content = fabric.FabricName; LabelFabricColor.Content = fabricColor.Color; _processSequenceListGroup = processSequenceListGroup; var processSequenceDetails = FabricModule.GetProcessSequencesByFabricID(_fabric.FabricID) .GroupBy(g => g.Group) .ToDictionary(g => g.Key, g => new ObservableCollection <ProcessSequenceDetail>(g.OrderBy(o => o.Order).ToList())); foreach (var item in processSequenceDetails) { if (!_processSequenceListGroup.Keys.Contains(item.Key)) { _processSequenceListGroup.Add(item.Key, item.Value); } } ComboBoxProcessGroup.ItemsSource = _processSequenceListGroup.Keys.ToList(); ComboBoxFactoryList.ItemsSource = FactoryModule.GetFactoryList(); DataGridProcessSequence.ItemsSource = _processSequenceDetails; }
/*******************************************************************************************************/ #region INITIALIZATION public Items_Form(Guid inventoryID) { InitializeComponent(); Settings.setGeneralSettings(this); _inventory = new Inventory(inventoryID); lblInventoryID.Text = String.Format("{0} - {1}", _inventory.code.ToString(), _inventory.product_store_name); lblLengthUnit.Text = _inventory.length_unit_name; lblColor.Text = _inventory.color_name; lblGrade.Text = _inventory.grade_name; lblWidth.Text = _inventory.product_width_name; lblReceiveDate.Text = string.Format("{0:dd/MM/yy HH:mm}", _inventory.receive_date); if (new FabricColor(_inventory.color_id).Allow2ndColor) { cbColors.Enabled = true; btnAddColor.Enabled = true; } FabricColor.populateDropDownList(cbColors, false, true); disableForm(); grid.AutoGenerateColumns = false; col_grid_id.DataPropertyName = InventoryItem.COL_DB_ID; col_grid_lastOpname.DataPropertyName = InventoryItem.COL_LASTOPNAME; col_grid_ItemLocation.DataPropertyName = InventoryItemCheck.COL_DB_ItemLocation; col_grid_colorname.DataPropertyName = InventoryItem.COL_INVENTORYITEMCOLORNAME; col_grid_notes.DataPropertyName = InventoryItem.COL_DB_NOTES; col_grid_SaleOrderItemDescription.DataPropertyName = InventoryItem.COL_SaleOrderItemDescription; populateGrid(); txtBarcode.MaxLength = Settings.itemBarcodeLength + Settings.itemBarcodeMandatoryPrefix.Length; }
private void ButtonDeleteFabricIngredientProportions_Click(object sender, RoutedEventArgs e) { FabricColor fabricColor = ComboBoxFabricColor.SelectedItem as FabricColor; int groupNo = Convert.ToInt16(ComboBoxGroup.SelectedItem); bool success = FabricModule.DeleteFabricIngredientProportions(fabricColor.ColorNo, groupNo); success.CheckSuccessMessageBox("刪除成功!!", "好像有錯誤喔!!"); }
public EditProportionGroupDialog(Fabric fabric, FabricColor FabricColor, ObservableCollection <FabricColor> fabricColorList) { InitializeComponent(); LabelFabricName.Content = fabric.FabricName; ComboBoxFabricColor.ItemsSource = fabricColorList; int selectedIndex = fabricColorList.Select(s => s.ColorNo).ToList().IndexOf(FabricColor.ColorNo); ComboBoxFabricColor.SelectedIndex = selectedIndex; }
private void ButtonAddIngredientGroup_Click(object sender, RoutedEventArgs e) { FabricColor selectedFabricColor = ComboBoxFabricColor.SelectedItem as FabricColor; IngredientGroupInfo ingredientGroupInfo = FabricModule.GetIngredientGroupInfo(selectedFabricColor.FabricID, selectedFabricColor.ColorNo); List <FabricIngredientProportion> fabricIngredientProportion = (DataGridFabricIngredientProportion.ItemsSource as IEnumerable <FabricIngredientProportion>).ToList(); fabricIngredientProportion.ForEach(f => f.Group = ingredientGroupInfo.Group + 1); bool success = FabricModule.InsertFabricIngredientProportions(ingredientGroupInfo.ColorNo, fabricIngredientProportion); success.CheckSuccessMessageBox("新增成功!!", "好像有錯誤喔!!"); }
private XColor_Color CreateColorData(FabricColor fabricColor) { return(new XColor_Color() { WebColor = fabricColor.Color.WebColor, Hue = fabricColor.Color.Hue, Saturation = fabricColor.Color.Saturation, Lightness = fabricColor.Color.Brightness, Sku = fabricColor.Sku, Name = fabricColor.Name }); }
protected override Boolean isInputFieldsValid() { if (string.IsNullOrEmpty(_inputTxtName.TextValue)) { return(_inputTxtName.TextError("Please provide name")); } else if ((Mode != FormMode.Update && FabricColor.isNameExist(_inputTxtName.TextValue, null)) || (Mode == FormMode.Update && FabricColor.isNameExist(_inputTxtName.TextValue, selectedRowID()))) { return(_inputTxtName.TextError("Name is already in the list")); } return(true); }
private void setupControls() { Settings.setGeneralSettings(this); FabricColor.populateDropDownList(cbColors, false, true); Tools.resetDropDownList(cbColors); pnlItem.Enabled = false; lblBarcode.Text = ""; lblColor.Text = ""; lblGrade.Text = ""; lblItemInfo.Text = ""; lblWidth.Text = ""; }
/*******************************************************************************************************/ #region OVERRIDE METHODS protected override void setupFields() { Settings.setGeneralSettings(this); setColumnsDataPropertyNames(ProductPrice.COL_DB_ID, null, null, null, null, null); ProductStoreName.populateInputControlDropDownList(iddl_ProductStoreNames, false); Grade.populateInputControlDropDownList(iddl_Grades, false); ProductWidth.populateInputControlDropDownList(iddl_ProductWidths, false); LengthUnit.populateInputControlDropDownList(iddl_LengthUnits, false); FabricColor.populateInputControlDropDownList(iddl_FabricColors, false); col_dgv_Products_Storename = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Products_Storename", iddl_ProductStoreNames.LabelText, ProductPrice.COL_PRODUCTSTORENAME, true, true, "", true, false, 60, DataGridViewContentAlignment.MiddleLeft); col_dgv_Grades_Name = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Grades_Name", iddl_Grades.LabelText, ProductPrice.COL_Grades_Name, true, true, "", true, false, 60, DataGridViewContentAlignment.MiddleLeft); col_dgv_ProductWidths_Name = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_ProductWidths_Name", iddl_ProductWidths.LabelText, ProductPrice.COL_ProductWidths_Name, true, true, "", true, false, 60, DataGridViewContentAlignment.MiddleLeft); col_dgv_LengthUnits_Name = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_LengthUnits_Name", iddl_LengthUnits.LabelText, ProductPrice.COL_LengthUnits_Name, true, true, "", true, false, 60, DataGridViewContentAlignment.MiddleLeft); col_dgv_FabricColors_Name = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_FabricColors_Name", iddl_FabricColors.LabelText, ProductPrice.COL_COLORNAME, true, true, "", true, false, 60, DataGridViewContentAlignment.MiddleLeft); col_dgv_SellPrice = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_SellPrice", in_SellPrice.LabelText, ProductPrice.COL_DB_SELLPRICE, true, true, "N2", false, false, 60, DataGridViewContentAlignment.MiddleRight); col_dgv_BuyPrice = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_BuyPrice", in_BuyPrice.LabelText, ProductPrice.COL_DB_BuyPrice, true, true, "N2", false, false, 60, DataGridViewContentAlignment.MiddleRight); col_dgv_Notes = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Notes", itxt_Notes.LabelText, ProductPrice.COL_DB_NOTES, true, true, "", true, true, 50, DataGridViewContentAlignment.MiddleLeft); col_dgv_Notes.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; col_dgv_Checked = base.addColumn <DataGridViewCheckBoxCell>(dgv, "col_dgv_Checked", "OK", ProductPrice.COL_DB_Checked, true, true, "", false, false, 30, DataGridViewContentAlignment.MiddleLeft); }
private void ComboBoxFabricColor_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBoxGroup.SelectedIndex = -1; ComboBox comboBox = (ComboBox)sender; FabricColor fabricColor = comboBox.SelectedItem as FabricColor; if (fabricColor == null) { return; //未知發生的錯誤,有時間再來查看看什麼問題 } var dictionaryFabricIngredientProportion = FabricModule.GetDictionaryFabricIngredientProportion(new List <int> { fabricColor.ColorNo }); _dictionaryFabricIngredientProportion = dictionaryFabricIngredientProportion.Count == 0 ? new Dictionary <int, ObservableCollection <FabricIngredientProportion> > { { 1, new ObservableCollection <FabricIngredientProportion>() } } : dictionaryFabricIngredientProportion; DataGridFabricIngredientProportion.ItemsSource = _dictionaryFabricIngredientProportion[_dictionaryFabricIngredientProportion.First().Key]; ComboBoxGroup.ItemsSource = _dictionaryFabricIngredientProportion.Select(s => s.Key); ComboBoxGroup.SelectedIndex = 0; }
/*******************************************************************************************************/ #region INITIALIZATION public Main_Form() { InitializeComponent(); Settings.setGeneralSettings(this); //initialize filter fields dtStart.ShowCheckBox = true; dtEnd.ShowCheckBox = true; Customer.populateInputControlDropDownList(iddl_Customers, true); Vendor.populateInputControlDropDownList(iddl_Vendors, true); UserAccount.populateInputControlDropDownList(iddl_UserAccounts, true); ProductStoreName.populateInputControlCheckedListBox(iclb_ProductStoreNames, true); FabricColor.populateInputControlCheckedListBox(iclb_Colors, true); clearFilter(); txtSaleBarcode.MaxLength = Settings.saleBarcodeLength; txtInventoryItemBarcode.MaxLength = Settings.itemBarcodeLength + Settings.itemBarcodeMandatoryPrefix.Length; PettyCashRecordsCategory.populateInputControlDropDownList(iddl_PettyCashCategories, false); gridMaster.AutoGenerateColumns = false; gridMaster.SelectionMode = DataGridViewSelectionMode.FullRowSelect; gridMaster.Sort(col_gridmaster_timestamp, ListSortDirection.Descending); col_gridmaster_completed.DataPropertyName = Sale.COL_COMPLETED; col_gridmaster_profit.DataPropertyName = Sale.COL_PROFIT; col_gridmaster_profitpercent.DataPropertyName = Sale.COL_PROFITPERCENT; col_gridmaster_specialuseronly.DataPropertyName = Sale.COL_DB_SPECIALUSERONLY; col_gridmaster_shippingcost.DataPropertyName = Sale.COL_DB_SHIPPINGCOST; col_gridmaster_taxno.DataPropertyName = Sale.COL_DB_TAXNO; col_gridmaster_returnedamount.DataPropertyName = Sale.COL_RETURNEDAMOUNT; col_gridmaster_taxno.DataPropertyName = Sale.COL_DB_TAXNO; col_gridMaster_isManualAdjustment.DataPropertyName = Sale.COL_isManualAdjustment; col_gridmaster_SaleCommission_Users_Name.DataPropertyName = Sale.COL_SaleCommission_Users_Name; col_gridMaster_Vendors_Name.DataPropertyName = Sale.COL_Vendors_Name; col_gridMaster_FakturPajaks_No.DataPropertyName = Sale.COL_FakturPajaks_No; col_gridMaster_ShippingExpense.DataPropertyName = Sale.COL_DB_ShippingExpense; col_gridmaster_isReported.DataPropertyName = Sale.COL_DB_ISREPORTED; col_gridmaster_isReported.Visible = false; gridDetail.AutoGenerateColumns = false; col_gridDetail_id.DataPropertyName = SaleItem.COL_INVENTORY_ITEM_ID; gridSummary.AutoGenerateColumns = false; col_gridsummary_priceperunit.DataPropertyName = SaleItem.COL_SALE_ADJUSTEDPRICE; col_gridsummary_buyprice.DataPropertyName = SaleItem.COL_BUYPRICE; col_gridSummary_profit.DataPropertyName = SaleItem.COL_PROFIT; col_gridSummary_profitpercent.DataPropertyName = SaleItem.COL_PROFITPERCENT; col_gridSummary_isManualAdjustment.DataPropertyName = SaleItem.COL_DB_isManualAdjustment; col_gridSummary_CommissionAmount.DataPropertyName = SaleItem.COL_TotalCommissionAmount; col_gridSummary_CommissionPercent.DataPropertyName = SaleItem.COL_DB_CommissionPercent; if (GlobalData.UserAccount.role != Roles.Super) { col_gridmaster_specialuseronly.Visible = false; col_gridmaster_completed.Visible = false; col_gridmaster_isReported.Visible = false; col_gridmaster_taxno.Visible = false; col_gridMaster_isManualAdjustment.Visible = false; col_gridmaster_SaleCommission_Users_Name.Visible = false; col_gridSummary_isManualAdjustment.Visible = false; col_gridSummary_CommissionAmount.Visible = false; col_gridSummary_CommissionPercent.Visible = false; chkOnlyLossProfit.Visible = false; btnShowHidden.Visible = false; iddl_UserAccounts.Visible = false; chkOnlyNotCompleted.Visible = false; chkOnlyManualAdjustment.Visible = false; chkOnlyWithCommission.Visible = false; iddl_UserAccounts.Visible = false; //Tools.clearWhenSelected(gridMaster); } }
/*******************************************************************************************************/ #region METHODS protected override void setupFields() { Settings.setGeneralSettings(this); DoNotClearInputAfterSubmission = true; col_grid_name.Visible = false; disableFieldActive(); btnAction1.Enabled = true; btnAction1.Text = "DELETE"; btnAction1.Width = 100; btnAction2.Enabled = true; btnAction2.Text = "CLEAR QTY"; btnAction2.Width = 100; btnAction3.Enabled = true; btnAction3.Text = "CREATE PO"; btnAction3.Width = 100; btnAction4.Enabled = true; btnAction4.Text = "HIDE COLUMNS"; btnAction4.Width = 120; btnAction5.Enabled = true; btnAction5.Text = "-"; btnAction5.Width = 30; btnAction6.Enabled = true; btnAction6.Text = "+"; btnAction6.Width = 30; //NOTES: must use inputColumns sequentially from the first one to the next. Otherwise calculation of the form width will be off //Field ID col_grid_id.DataPropertyName = InventoryStockLevel.COL_DB_ID; //Field Default col_grid_default.Visible = false; //Filter Vendor - dropdownlist _inputDDLVendors = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 0, "Vendor", InventoryStockLevel.COL_VENDORNAME, (int)MasterDataColumnWidth.Fit, true, false, null); Vendor.populateDropDownList(_inputDDLVendors.Dropdownlist, false, true); //populate _inputDDLVendors.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateVendors_LinkClicked); //add event handler for update link _inputDDLVendors.Dropdownlist.SelectedIndexChanged += new System.EventHandler(this.cbVendors_SelectedIndexChanged); _inputDDLVendors.Dropdownlist.TextChanged += new System.EventHandler(this.cbVendors_TextChanged); //Field Name/Store - dropdownlist _inputDDLProducts = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 0, "Product", InventoryStockLevel.COL_PRODUCTSTORENAME, (int)MasterDataColumnWidth.Fit, true, false, null); _inputDDLProducts.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateProducts_LinkClicked); //add event handler for update link _inputDDLProducts.Enabled = false; //Field Grades - dropdownlist _inputDDLGrades = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 0, "Grade", InventoryStockLevel.COL_GRADE_NAME, (int)MasterDataColumnWidth.Fit, true, false, null); _inputDDLGrades.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateGrades_LinkClicked); //add event handler for update link Grade.populateDropDownList(_inputDDLGrades.Dropdownlist, false, true); //populate //Field Product Widths - dropdownlist _inputDDLProductWidths = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 0, "Lebar", InventoryStockLevel.COL_PRODUCT_WIDTH_NAME, (int)MasterDataColumnWidth.Fit, true, false, null); _inputDDLGrades.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateProductWidths_LinkClicked); //add event handler for update link ProductWidth.populateDropDownList(_inputDDLProductWidths.Dropdownlist, false, true); //populate //Field Color - dropdownlist _inputDDLColors = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 1, "Color", InventoryStockLevel.COL_COLOR_NAME, (int)MasterDataColumnWidth.Fit, true, false, null); _inputDDLColors.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateColors_LinkClicked); //add event handler for update link FabricColor.populateDropDownList(_inputDDLColors.Dropdownlist, false, true); //populate //Field Length Units - dropdownlist _inputDDLLengthUnits = (InputDropdownlist)setupInputControl(new InputDropdownlist(), 1, "Unit", InventoryStockLevel.COL_LENGTH_UNIT_NAME, (int)MasterDataColumnWidth.Fit, true, false, null); _inputDDLLengthUnits.UpdateLink.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkUpdateLengthUnits_LinkClicked); //add event handler for update link LengthUnit.populateDropDownList(_inputDDLLengthUnits.Dropdownlist, false, true); //populate //Field Lot Qty - textbox _inputTxtOrderLotQty = (InputTextbox)setupInputControl(new InputTextbox(), 1, "Lot Qty", InventoryStockLevel.COL_DB_ORDERLOTQTY, (int)MasterDataColumnWidth.Fit, true, false, null); _inputTxtOrderLotQty.setMaxLength(5); //set max length //Field Qty - textbox _inputTxtQty = (InputTextbox)setupInputControl(new InputTextbox(), 1, "Min Qty", InventoryStockLevel.COL_DB_QTY, 40, true, false, null); _inputTxtQty.setMaxLength(5); //set max length //add columns col_grid_remainingQty = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_remainingQty", "Stock", InventoryStockLevel.COL_REMAININGSTOCKQTY, 40, true, null); //add field to gridview col_grid_bookedQty = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_bookedQty", "Booked", InventoryStockLevel.COL_BOOKEDQTY, 50, true, null); //add field to gridview col_grid_orderQty = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_orderQty", "Pending", InventoryStockLevel.COL_PENDINGDELIVERYQTY, 50, true, null); //add field to gridview col_grid_newQty = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_newQty", "Order", InventoryStockLevel.COL_NEWORDER_QTY, 40, false, null); //add field to gridview col_grid_lastOrderInventoryID = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_referencedInventoryID", "", InventoryStockLevel.COL_LASTORDERINVENTORYID, 40, true, null); //add field to gridview col_grid_lastOrderInventoryID.Visible = false; col_grid_lastOrderTimestamp = Tools.addColumn <DataGridViewTextBoxCell>(gridview, "col_grid_lastOrderTimestamp", "", InventoryStockLevel.COL_LASTORDERTIMESTAMP, 40, true, null); //add field to gridview col_grid_lastOrderTimestamp.Visible = false; //Field PO Notes - textbox _inputTxtPONotes = (InputTextbox)setupInputControl(new InputTextbox(), 2, "PO Notes", InventoryStockLevel.COL_DB_PONOTES, (int)MasterDataColumnWidth.Fit, false, true, null); _inputTxtPONotes.setToMultiline(4); _inputTxtPONotes.setMaxLength(50); //set max length //Field Notes - textbox _inputTxtNotes = (InputTextbox)setupInputControl(new InputTextbox(), 2, "Notes", InventoryStockLevel.COL_DB_NOTES, 100, false, true, null); _inputTxtNotes.setToMultiline(4); _inputTxtNotes.setMaxLength(100); //set max length gridview.Columns[InventoryStockLevel.COL_DB_NOTES].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; //set default control to focus DefaultInputToFocus = _inputDDLVendors; clearInputFields(); //clear dropdownlists if (GlobalData.UserAccount.role != Roles.Super) { btnAction1.Enabled = false; btnAction3.Enabled = false; gridview.Columns[InventoryStockLevel.COL_DB_PONOTES].Visible = false; } }
private void lnkUpdateColors_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Tools.displayForm(new MasterData.FabricColors_Form(FormMode.New)); FabricColor.populateDropDownList(_inputDDLColors.Dropdownlist, false, true); }
protected override void updateActiveStatus(Guid id, Boolean activeStatus) { FabricColor.updateActiveStatus(id, activeStatus); }
protected override void updateDefaultRow(Guid id) { FabricColor.updateDefaultRow(id); }
protected override void updateCheckboxColumn(Guid id, Boolean newValue) { FabricColor.updateAllow2ndColor(id, newValue); }
protected override System.Data.DataView loadGridviewDataSource() { return(FabricColor.getByFilter(chkIncludeInactive.Checked, _inputTxtName.TextValue).DefaultView); }
protected override void populateInputFields() { FabricColor obj = new FabricColor(selectedRowID()); _inputTxtName.TextValue = obj.Name; }
private void setupControls() { Settings.setGeneralSettings(this); Customer.populateDropDownList(cbExcludeCustomers, false, false); LengthUnit.populateInputControlCheckedListBox(iclb_LengthUnits, false); FabricColor.populateInputControlCheckedListBox(iclb_Colors, false); Grade.populateInputControlCheckedListBox(iclb_Grades, false); ProductWidth.populateInputControlCheckedListBox(iclb_ProductWidths, false); ProductStoreName.populateInputControlCheckedListBox(iclb_ProductStoreNames, false); Customer.populateInputControlCheckedListBox(iclb_Customers, false); gridSummaryByMonth.AutoGenerateColumns = false; gridSummaryByMonth.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_gridsummary_month.DataPropertyName = Sale.COL_CHART_SALEYEARMONTH; col_gridsummary_qty.DataPropertyName = Sale.COL_CHART_QTY; col_gridsummary_sales.DataPropertyName = Sale.COL_CHART_TOTAL; col_gridsummary_profit.DataPropertyName = Sale.COL_CHART_PROFIT; col_gridsummary_percentage.DataPropertyName = Sale.COL_CHART_PERCENT; gridSummaryByCustomers.AutoGenerateColumns = false; gridSummaryByCustomers.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_dgvSummaryByCustomers_customer_id.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_CUSTOMERID; col_dgvSummaryByCustomers_customer_name.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_CUSTOMERNAME; col_dgvSummaryByCustomers_sale_length.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_SALEQTY; col_dgvSummaryByCustomers_sale_amount.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_SALEAMOUNT; col_dgvSummaryByCustomers_profit_amount.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_PROFITAMOUNT; col_dgvSummaryByCustomers_profit_percent.DataPropertyName = Sale.COL_CHARTSUMMARYBYCUSTOMERS_PROFITPERCENT; dgvDetailBySales.AutoGenerateColumns = false; Tools.clearWhenSelected(dgvDetailBySales); col_griddetail_saleid.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_SALEID; col_griddetail_timestamp.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_TIMESTAMP; col_griddetail_barcode.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_SALEBARCODE; col_griddetail_customername.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_CUSTOMERNAME; col_griddetail_pcs.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_SALEPCS; col_griddetail_qty.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_SALEQTY; col_griddetail_amount.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_SALEAMOUNT; col_griddetail_profit.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_PROFITAMOUNT; col_griddetail_profitpercent.DataPropertyName = Sale.COL_CHARTDETAILBYSALES_PROFITPERCENT; dgvDetailByProducts.AutoGenerateColumns = false; Tools.clearWhenSelected(dgvDetailByProducts); col_dgvDetailByProducts_product_id.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_PRODUCTID; col_dgvDetailByProducts_product_name.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_PRODUCTNAME; col_dgvDetailByProducts_sale_qty.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_SALEPCS; col_dgvDetailByProducts_sale_length.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_SALEQTY; col_dgvDetailByProducts_sale_amount.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_SALEAMOUNT; col_dgvDetailByProducts_profit_amount.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_PROFITAMOUNT; col_dgvDetailByProducts_profit_percent.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_PROFITPERCENT; col_dgvDetailByProducts_grade.DataPropertyName = Sale.COL_CHARTDETAILBYPRODUCTS_GRADE; dgvDetailByCustomers.AutoGenerateColumns = false; Tools.clearWhenSelected(dgvDetailByCustomers); col_dgvDetailByCustomers_customer_id.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_CUSTOMERID; col_dgvDetailByCustomers_customer_name.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_CUSTOMERNAME; col_dgvDetailByCustomers_sale_qty.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_SALEPCS; col_dgvDetailByCustomers_sale_length.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_SALEQTY; col_dgvDetailByCustomers_sale_amount.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_SALEAMOUNT; col_dgvDetailByCustomers_profit_amount.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_PROFITAMOUNT; col_dgvDetailByCustomers_profit_percent.DataPropertyName = Sale.COL_CHARTDETAILBYCUSTOMERS_PROFITPERCENT; clearCharts(); //Hidden col_gridsummary_sales.Visible = false; col_gridsummary_profit.Visible = false; col_gridsummary_percentage.Visible = false; col_dgvSummaryByCustomers_sale_amount.Visible = false; col_dgvSummaryByCustomers_profit_amount.Visible = false; col_dgvSummaryByCustomers_profit_percent.Visible = false; col_griddetail_amount.Visible = false; col_griddetail_profit.Visible = false; col_griddetail_profitpercent.Visible = false; col_dgvDetailByProducts_profit_amount.Visible = false; col_dgvDetailByProducts_profit_percent.Visible = false; col_dgvDetailByProducts_sale_amount.Visible = false; col_dgvDetailByCustomers_profit_amount.Visible = false; col_dgvDetailByCustomers_profit_percent.Visible = false; col_dgvDetailByCustomers_sale_amount.Visible = false; if (GlobalData.UserAccount.role != Roles.Super) { chkShowHidden.Visible = false; //chartSales.Visible = false; //chartProfit.Visible = false; tcCharts.TabPages.Remove(tpSales); tcCharts.TabPages.Remove(tpProfit); chkIsReported.Visible = false; } }
protected override void update() { FabricColor.update(selectedRowID(), _inputTxtName.TextValue); }
protected override void add() { FabricColor.add(_inputTxtName.TextValue); }
private void btnAddColor_Click(object sender, EventArgs e) { Tools.displayForm(new MasterData.FabricColors_Form(FormMode.New)); FabricColor.populateDropDownList(cbColors, false, true); }
private void setupControls() { Settings.setGeneralSettings(this); if (_formMode == FormMode.Browse) { flpButtons.Enabled = false; //splitContainer1.Panel1Collapsed = true; } lblRowInfoHeader.Text = ""; Grade.populateInputControlCheckedListBox(iclb_Grades, false); ProductWidth.populateInputControlCheckedListBox(iclb_ProductWidths, false); ProductStoreName.populateInputControlCheckedListBox(iclb_ProductStoreNames, false); LengthUnit.populateInputControlCheckedListBox(iclb_LengthUnits, false); FabricColor.populateInputControlCheckedListBox(iclb_Colors, false); grid.AutoGenerateColumns = false; grid.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_grid_active.DataPropertyName = Inventory.COL_DB_ACTIVE; col_grid_receiveDate.DataPropertyName = Inventory.COL_DB_RECEIVEDATE; col_grid_code.DataPropertyName = Inventory.COL_DB_CODE; col_grid_grade.DataPropertyName = Inventory.COL_GRADE_NAME; col_grid_product.DataPropertyName = Inventory.COL_PRODUCTSTORENAME; col_grid_productWidth.DataPropertyName = Inventory.COL_PRODUCT_WIDTH_NAME; col_grid_color.DataPropertyName = Inventory.COL_COLOR_NAME; col_grid_sellPrice.DataPropertyName = Inventory.COL_SELLPRICE; col_grid_buyPrice.DataPropertyName = Inventory.COL_DB_BUYPRICE; col_grid_unit.DataPropertyName = Inventory.COL_LENGTH_UNIT_NAME; col_grid_availablePcs.DataPropertyName = Inventory.COL_AVAILABLEQTY; col_grid_availableQty.DataPropertyName = Inventory.COL_AVAILABLEITEMLENGTH; col_grid_totalPcs.DataPropertyName = Inventory.COL_QTY; col_grid_totalQty.DataPropertyName = Inventory.COL_ITEMLENGTH; col_grid_PONo.DataPropertyName = Inventory.COL_PONo; col_grid_invoiceNo.DataPropertyName = Inventory.COL_VENDORINVOICENO; col_grid_packingListNo.DataPropertyName = Inventory.COL_DB_PACKINGLISTNO; col_grid_isConsignment.DataPropertyName = Inventory.COL_DB_IsConsignment; col_grid_OpnameMarker.DataPropertyName = Inventory.COL_DB_OpnameMarker; col_grid_code.Frozen = true; col_grid_buyPrice.Visible = false; gridSummary.AutoGenerateColumns = false; gridSummary.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_gridSummary_availablePcs.DataPropertyName = Inventory.COL_AVAILABLEQTY; col_gridSummary_availableQty.DataPropertyName = Inventory.COL_AVAILABLEITEMLENGTH; col_gridSummary_averagePrice.DataPropertyName = Inventory.COL_DB_BUYPRICE; col_gridSummary_grade.DataPropertyName = Inventory.COL_GRADE_NAME; col_gridSummary_Product_Id.DataPropertyName = Inventory.COL_PRODUCTID; col_gridSummary_StoreName.DataPropertyName = Inventory.COL_PRODUCTSTORENAME; col_gridSummary_unitName.DataPropertyName = Inventory.COL_LENGTH_UNIT_NAME; col_gridSummary_Width.DataPropertyName = Inventory.COL_PRODUCT_WIDTH_NAME; col_gridSummary_BuyValue.DataPropertyName = Inventory.COL_BUYVALUE; col_gridSummary_SellValue.DataPropertyName = Inventory.COL_SELLVALUE; gridSummaryByColor.AutoGenerateColumns = false; gridSummaryByColor.SelectionMode = DataGridViewSelectionMode.FullRowSelect; col_gridSummaryByColor_availablePcs.DataPropertyName = Inventory.COL_AVAILABLEQTY; col_gridSummaryByColor_AvailableQty.DataPropertyName = Inventory.COL_AVAILABLEITEMLENGTH; col_gridSummaryByColor_AveragePrice.DataPropertyName = Inventory.COL_DB_BUYPRICE; col_gridSummaryByColor_Grade.DataPropertyName = Inventory.COL_GRADE_NAME; col_gridSummaryByColor_ColorName.DataPropertyName = Inventory.COL_COLOR_NAME; col_gridSummaryByColor_ProductId.DataPropertyName = Inventory.COL_PRODUCTID; col_gridSummaryByColor_ProductStoreName.DataPropertyName = Inventory.COL_PRODUCTSTORENAME; col_gridSummaryByColor_UnitName.DataPropertyName = Inventory.COL_LENGTH_UNIT_NAME; col_gridSummaryByColor_ProductWidthName.DataPropertyName = Inventory.COL_PRODUCT_WIDTH_NAME; col_gridSummaryByColor_BuyValue.DataPropertyName = Inventory.COL_BUYVALUE; col_gridSummaryByColor_SellValue.DataPropertyName = Inventory.COL_SELLVALUE; if (GlobalData.UserAccount.role != Roles.Super) { chkShowHidden.Visible = false; pbLog.Enabled = false; chkRearrange.Visible = false; chkCalculateBuyValue.Visible = false; col_grid_isConsignment.Visible = false; col_gridSummary_averagePrice.Visible = false; col_gridSummary_BuyValue.Visible = false; col_gridSummary_SellValue.Visible = false; col_gridSummaryByColor_AveragePrice.Visible = false; col_gridSummaryByColor_BuyValue.Visible = false; col_gridSummaryByColor_SellValue.Visible = false; } }