Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
0
        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;
            }
        }