Ejemplo n.º 1
0
        private void fillProductionStatusCumbo(int status)
        {
            try
            {
                StatusCatalogueDB.fillStatusCatalogueCombo(cmbProductionStatus, "PRODUCTIONPLAN"); // adding all status availble

                Dictionary <string, Structures.ComboBoxItem> CmbDict = new Dictionary <string, Structures.ComboBoxItem>();
                foreach (var item in cmbProductionStatus.Items)
                {
                    Structures.ComboBoxItem val = ((Structures.ComboBoxItem)item);
                    string id = ((Structures.ComboBoxItem)val).HiddenValue;
                    CmbDict.Add(id, val);
                }
                if (status == 1) // approved
                {
                    cmbProductionStatus.Items.Clear();
                    //cmbProductionStatus.Items.Add(CmbDict["2"]); //For start
                    cmbProductionStatus.Items.Add(CmbDict["3"]); //For Cancel
                    cmbProductionStatus.Items.Add(CmbDict["4"]); //For halt
                }
                else if (status == 2)                            // started
                {
                    cmbProductionStatus.Items.Clear();
                    cmbProductionStatus.Items.Add(CmbDict["99"]); //For complete
                    cmbProductionStatus.Items.Add(CmbDict["3"]);  //For cancel
                    cmbProductionStatus.Items.Add(CmbDict["4"]);  //For halt
                }
                else if (status == 4)                             //Halted
                {
                    cmbProductionStatus.Items.Clear();
                    cmbProductionStatus.Items.Add(CmbDict["5"]); //For Resume
                    cmbProductionStatus.Items.Add(CmbDict["4"]); //For Cancel
                }
                else if (status == 5)                            // Resumed
                {
                    cmbProductionStatus.Items.Clear();
                    //cmbProductionStatus.Items.Add(CmbDict["2"]); //For start
                    cmbProductionStatus.Items.Add(CmbDict["3"]);  //For Halt
                    cmbProductionStatus.Items.Add(CmbDict["4"]);  //For Cancel
                    cmbProductionStatus.Items.Add(CmbDict["99"]); //For complete
                }
            }
            catch (Exception ex)
            {
            }
            if (status.Equals("1"))
            {
                cmbProductionStatus.Items.Add("2-Halted");
                cmbProductionStatus.Items.Add("3-Canceled");
                cmbProductionStatus.Items.Add("99-Completed");
            }
            else if (status.Equals("2"))
            {
                cmbProductionStatus.Items.Add("1-Production Stage");
            }
        }
Ejemplo n.º 2
0
 private void initVariables()
 {
     pnlgrdList.Visible           = false;
     grdList.Visible              = false;
     lblSearch.Visible            = false;
     txtSearch.Visible            = false;
     cmbFilterStock.SelectedIndex = 1;
     CatalogueValueDB.fillCatalogValueComboNew(cmbStoreLocation, "StoreLocation");
     Structures.ComboBoxItem cbitem =
         new Structures.ComboBoxItem("All", "All");
     cmbStoreLocation.Items.Add(cbitem);
     cmbStoreLocation.SelectedIndex = cmbStoreLocation.Items.Count - 1;
 }
Ejemplo n.º 3
0
 private void fillDocumentStatusCombo(System.Windows.Forms.ComboBox cmb)
 {
     try
     {
         Structures.ComboBoxItem item  = new Structures.ComboBoxItem("Active", "1");
         Structures.ComboBoxItem item1 = new Structures.ComboBoxItem("Deactive", "0");
         cmbStatus.Items.Clear();
         cmbStatus.Items.Add(item);
         cmbStatus.Items.Add(item1);
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 4
0
        private void initVariables()
        {
            if (getuserPrivilegeStatus() == 1)
            {
                listOption = 6;
            }

            Structures.ComboBoxItem cbitem = new Structures.ComboBoxItem("All", "All");


            docID = Main.currentDocument;
            CustomerDB.fillLedgerTypeComboNew(cmbCustomer, "Supplier");
            cmbCustomer.Items.Add("All");

            cmbCustomer.SelectedItem = "All";
            cmbTrack.SelectedIndex   = 0;



            dtFrom.Format       = DateTimePickerFormat.Custom;
            dtFrom.CustomFormat = "dd-MM-yyyy";
            dtFrom.Enabled      = true;
            dtFrom.Value        = DateTime.Now.AddMonths(-2);
            dtTo.Format         = DateTimePickerFormat.Custom;
            dtTo.CustomFormat   = "dd-MM-yyyy";
            dtTo.Enabled        = true;
            ////pnlUI.Controls.Add(pnlAddEdit);
            closeAllPanels();
            {
                TaxDetailsTable.Columns.Add("TaxItem", typeof(string));
                TaxDetailsTable.Columns.Add("TaxAmount", typeof(double));
            }
            cmbCustomer.TabIndex = 0;
            ////grdPOPIDetail.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            userString = Login.userLoggedInName + Main.delimiter1 + Login.userLoggedIn + Main.delimiter1 + Main.delimiter2;
            userCommentStatusString = Login.userLoggedInName + Main.delimiter1 + Login.userLoggedIn + Main.delimiter1 + "0" + Main.delimiter2;
            setButtonVisibility("init");
        }