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;
            }
        }
        protected override Boolean isInputFieldsValid()
        {
            if (string.IsNullOrEmpty(_inputTxtName.TextValue))
            {
                return(_inputTxtName.TextError("Please provide name"));
            }
            else if ((Mode != FormMode.Update && ProductStoreName.isNameExist(_inputTxtName.TextValue, null)) ||
                     (Mode == FormMode.Update && ProductStoreName.isNameExist(_inputTxtName.TextValue, selectedRowID())))
            {
                return(_inputTxtName.TextError("Name is already in the list"));
            }

            return(true);
        }
Exemple #3
0
        /*******************************************************************************************************/
        #region METHODS

        #endregion METHODS
        /*******************************************************************************************************/
        #region OVERRIDE METHODS

        protected override void setupFields()
        {
            Settings.setGeneralSettings(this);

            setColumnsDataPropertyNames(Product.COL_DB_ID, Product.COL_DB_ACTIVE, null, null, null, null);
            col_dgv_ProductStoreName = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_ProductStoreName", iddl_ProductStoreNames.LabelText, Product.COL_STORENAME, true, true, "", true, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_NameVendor       = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_NameVendor", itxt_NameVendor.LabelText, Product.COL_DB_NAMEVENDOR, true, true, "", true, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Vendors_Name     = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Vendors_Name", iddl_Vendors.LabelText, Product.COL_VENDORNAME, true, true, "", true, false, 50, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_PercentageOfPercentCommission = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_PercentageOfPercentCommission", "%of%", Product.COL_DB_PercentageOfPercentCommission, true, true, "N2", false, false, 40, DataGridViewContentAlignment.MiddleRight);
            col_dgv_MaxCommissionAmount           = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_MaxCommission", "Max", Product.COL_DB_MaxCommissionAmount, true, true, "N0", false, false, 30, DataGridViewContentAlignment.MiddleRight);

            col_dgv_Notes = base.addColumn <DataGridViewTextBoxCell>(dgv, "col_dgv_Notes", itxt_Notes.LabelText, Product.COL_DB_NOTES, true, true, "", true, true, null, DataGridViewContentAlignment.MiddleLeft);
            col_dgv_Notes.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            ProductStoreName.populateInputControlDropDownList(iddl_ProductStoreNames, true);
            Vendor.populateDropDownList(iddl_Vendors.Dropdownlist.combobox, false, true);

            InputToDisableOnSearch.Add(in_PercentageOfPercentCommission);
            InputToDisableOnSearch.Add(in_MaxCommissionAmount);

            ptInputPanel.PerformClick();
        }
Exemple #4
0
        /*******************************************************************************************************/
        #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);
        }
Exemple #5
0
        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;
            }
        }
        /*******************************************************************************************************/
        #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);
            }
        }
Exemple #7
0
        /*******************************************************************************************************/
        #region EVENT HANDLERS

        private void iddl_StoreName_UpdateLink_Click(object sender, EventArgs e)
        {
            Util.displayForm(null, new MasterData.ProductStoreNames_Form(FormMode.New), false);
            ProductStoreName.populateDropDownList(iddl_ProductStoreNames.Dropdownlist.combobox, 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;
            }
        }
Exemple #9
0
        private void setupControls()
        {
            if (_formMode == FormMode.Search)
            {
                Vendor.populateDropDownList(cbVendors, false, true);
                Tools.populateDropDownList(cbStatus, typeof(POItemStatus));
                ProductStoreName.populateDropDownList(cbProductStoreNames, false, false);
            }
            else if (_formMode == FormMode.Browse)
            {
                //scMain.Panel1Collapsed = true;
                scMain.Visible = false;
            }

            gridPO.AutoGenerateColumns              = false;
            gridPO.SelectionMode                    = DataGridViewSelectionMode.FullRowSelect;
            col_gridPO_id.DataPropertyName          = PO.COL_DB_ID;
            col_gridPO_po_no.DataPropertyName       = PO.COL_DB_PONO;
            col_gridPO_timestamp.DataPropertyName   = PO.COL_DB_TIMESTAMP;
            col_gridPO_vendorID.DataPropertyName    = PO.COL_DB_VENDORID;
            col_gridPO_amount.DataPropertyName      = PO.COL_AMOUNT;
            col_gridPO_vendor_name.DataPropertyName = PO.COL_VENDORNAME;
            col_gridPO_notes.DataPropertyName       = PO.COL_DB_NOTES;

            gridPOItems.AutoGenerateColumns = false;
            gridPOItems.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            col_gridPOItems_productDescription.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            col_gridPOItems_id.DataPropertyName   = POItem.COL_DB_ID;
            col_gridPOItems_no.DataPropertyName   = POItem.COL_DB_LINENO;
            col_gridPOItems_date.DataPropertyName = POItem.COL_TIMESTAMP;
            col_gridPOItems_productDescription.DataPropertyName = POItem.COL_DB_PRODUCTDESCRIPTION;
            col_gridPOItems_notes.DataPropertyName        = POItem.COL_DB_NOTES;
            col_gridPOItems_qty.DataPropertyName          = POItem.COL_DB_QTY;
            col_gridPOItems_unitName.DataPropertyName     = POItem.COL_DB_UNITNAME;
            col_gridPOItems_receivedQty.DataPropertyName  = POItem.COL_RECEIVEDQTY;
            col_gridPOItems_pricePerUnit.DataPropertyName = POItem.COL_DB_PRICEPERUNIT;
            col_gridPOItems_subtotal.DataPropertyName     = POItem.COL_SUBTOTAL;
            col_gridPOItems_statusEnumID.DataPropertyName = POItem.COL_DB_STATUSENUMID;
            col_gridPOItems_status_name.DataPropertyName  = POItem.COL_STATUSNAME;
            col_gridPOItems_po_no.DataPropertyName        = POItem.COL_PONO;

            addStatusContextMenu(col_gridPOItems_status_name);

            if (GlobalData.UserAccount.role == Roles.User)
            {
                col_gridPO_amount.Visible            = false;
                col_gridPOItems_pricePerUnit.Visible = false;
                col_gridPOItems_subtotal.Visible     = false;
                col_gridPOItems_notes.Visible        = false;
                btnAddPO.Enabled = false;
            }

            if (_formMode == FormMode.Browse)
            {
                col_gridPOItems_pricePerUnit.Visible            = false;
                col_gridPOItems_subtotal.Visible                = false;
                col_gridPOItems_date.Visible                    = true;
                col_gridPOItems_po_no.Visible                   = true;
                col_gridPOItems_no.Visible                      = false;
                col_gridPOItems_status_name.Visible             = false;
                col_gridPOItems_productDescription.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            }

            dtpStart.Checked = true;
            dtpStart.Value   = DateTime.Today.AddMonths(-3);
            dtpEnd.Checked   = false;
        }
 protected override void add()
 {
     ProductStoreName.add(_inputTxtName.TextValue, _inputTxtNotes.TextValue);
 }
 protected override void update()
 {
     ProductStoreName.update(selectedRowID(), _inputTxtName.TextValue, _inputTxtNotes.TextValue);
 }
        protected override void populateInputFields()
        {
            ProductStoreName obj = new ProductStoreName(selectedRowID());

            _inputTxtName.TextValue = obj.Name;
        }
 protected override System.Data.DataView loadGridviewDataSource()
 {
     return(ProductStoreName.getByFilter(chkIncludeInactive.Checked, _inputTxtName.TextValue).DefaultView);
 }
 protected override void updateActiveStatus(Guid id, Boolean activeStatus)
 {
     ProductStoreName.updateActiveStatus(id, activeStatus);
 }