Exemple #1
0
 public frmSelWipCutting()
 {
     InitializeComponent();
     repo = new CuttingRepository();
     this.cmboColour.CheckStateChanged      += new System.EventHandler(this.cmboColour_CheckStateChanged);
     this.cmboQuality.CheckStateChanged     += new System.EventHandler(this.cmboQuality_CheckStateChanged);
     this.cmboDepartments.CheckStateChanged += new System.EventHandler(this.cmboDepartments_CheckStateChanged);
 }
 public frmCutSheetRegister()
 {
     InitializeComponent();
     repo = new CuttingRepository();
     //--------------------------------------------------------
     // wire up the check state changed event
     //--------------------------------------------------------------------------------------------------------
     this.cmboDepartments.CheckStateChanged += new System.EventHandler(this.cmboDepartments_CheckStateChanged);
 }
        public frmCreatePickingList()
        {
            InitializeComponent();
            oTxtBoxA            = new DataGridViewTextBoxColumn();
            oTxtBoxA.ReadOnly   = true;
            oTxtBoxA.Visible    = false;
            oTxtBoxA.ValueType  = typeof(Int32);
            oTxtBoxA.HeaderText = "Primary Key";
            dataGridView1.Columns.Add(oTxtBoxA);

            oChkA            = new DataGridViewCheckBoxColumn();
            oChkA.HeaderText = "Select";
            oChkA.ValueType  = typeof(bool);
            dataGridView1.Columns.Add(oChkA);

            oTxtBoxB            = new DataGridViewTextBoxColumn();
            oTxtBoxB.ReadOnly   = true;
            oTxtBoxB.ValueType  = typeof(string);
            oTxtBoxB.HeaderText = "Box Number";
            dataGridView1.Columns.Add(oTxtBoxB);

            oTxtBoxC            = new DataGridViewTextBoxColumn();
            oTxtBoxC.ReadOnly   = true;
            oTxtBoxC.ValueType  = typeof(string);
            oTxtBoxC.HeaderText = "Style";
            dataGridView1.Columns.Add(oTxtBoxC);

            oTxtBoxD            = new DataGridViewTextBoxColumn();
            oTxtBoxD.ReadOnly   = true;
            oTxtBoxD.ValueType  = typeof(string);
            oTxtBoxD.HeaderText = "Colour";
            dataGridView1.Columns.Add(oTxtBoxD);

            oTxtBoxE            = new DataGridViewTextBoxColumn();
            oTxtBoxE.ReadOnly   = true;
            oTxtBoxE.ValueType  = typeof(string);
            oTxtBoxE.HeaderText = "Size";
            dataGridView1.Columns.Add(oTxtBoxE);

            oTxtBoxF            = new DataGridViewTextBoxColumn();
            oTxtBoxF.ReadOnly   = true;
            oTxtBoxF.ValueType  = typeof(Int32);
            oTxtBoxF.HeaderText = "Box Qty";
            dataGridView1.Columns.Add(oTxtBoxF);

            dataGridView1.AllowUserToAddRows      = false;
            dataGridView1.AllowUserToDeleteRows   = false;
            dataGridView1.AllowUserToOrderColumns = false;

            repo = new CuttingRepository();

            this.cmboStyle.CheckStateChanged  += new System.EventHandler(this.cmboStyles_CheckStateChanged);
            this.cmboColour.CheckStateChanged += new System.EventHandler(this.cmboColours_CheckStateChanged);
            this.cmboSizes.CheckStateChanged  += new System.EventHandler(this.cmboSizes_CheckStateChanged);
        }
        public frmQaReportSelection()
        {
            InitializeComponent();

            parms = new CuttingQueryParameters();
            repo  = new CuttingRepository();


            //--------------------------------------------------------
            // wire up the check state changed event
            //--------------------------------------------------------------------------------------------------------
            this.cmboCutSheets.CheckStateChanged += new System.EventHandler(this.cmboQAResults_CheckStateChanged);
            this.cmboStyles.CheckStateChanged    += new System.EventHandler(this.cmboStyles_CheckStateChanged);
            this.cmboSizes.CheckStateChanged     += new System.EventHandler(this.cmboSizes_CheckStateChanged);
        }
Exemple #5
0
        public FrmBierriebiSel()
        {
            InitializeComponent();
            //--------------------------------------------------------
            // wire up the check state changed event
            //--------------------------------------------------------------------------------------------------------
            this.comboCutSheets.CheckStateChanged += new System.EventHandler(this.comboCutSheet_CheckStateChanged);
            this.comboGreige.CheckStateChanged    += new System.EventHandler(this.comboGreige_CheckStateChanged);
            this.comboOperator.CheckStateChanged  += new System.EventHandler(this.comboOperators_CheckStateChanged);
            this.comboMachines.CheckStateChanged  += new System.EventHandler(this.comboMachines_CheckStateChanged);

            repo = new CuttingRepository();

            var reportOptions = new BindingList <KeyValuePair <int, string> >();

            reportOptions.Add(new KeyValuePair <int, string>(1, "Quality"));
            reportOptions.Add(new KeyValuePair <int, string>(2, "Colour"));
            reportOptions.Add(new KeyValuePair <int, string>(3, "Operator"));

            comboReportOptions.DataSource    = reportOptions;
            comboReportOptions.ValueMember   = "Key";
            comboReportOptions.DisplayMember = "Value";
            comboReportOptions.SelectedIndex = -1;
        }
Exemple #6
0
 public frmSelPanelStock()
 {
     InitializeComponent();
     repo = new CuttingRepository();
     this.cmboWareHouseStore.CheckStateChanged += new System.EventHandler(this.cmboWareHouse_CheckStateChanged);
 }
Exemple #7
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Button oBtn = (Button)sender;

            QueryParms = new CuttingQueryParameters();
            repo       = new CuttingRepository();

            if (oBtn != null)
            {
                DateTime FromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                DateTime ToDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                ToDate = ToDate.AddHours(23);

                QueryParms.FromDate = FromDate;
                QueryParms.ToDate   = ToDate;

                if (_ProductionResults)
                {
                    if (chkProductionResults.Checked)
                    {
                        QueryParms.ProductionResults = true;
                    }

                    frmCutViewRep vRep = new frmCutViewRep(18, QueryParms);
                    int           h    = Screen.PrimaryScreen.WorkingArea.Height;
                    int           w    = Screen.PrimaryScreen.WorkingArea.Width;
                    vRep.ClientSize = new Size(w, h);
                    vRep.ShowDialog(this);
                }
                else
                {
                    using (var context = new TTI2Entities())
                    {
                        foreach (DataGridViewRow Row in dataGridView1.Rows)
                        {
                            if ((bool)Row.Cells[1].Value == false)
                            {
                                continue;
                            }

                            var Pk       = (int)Row.Cells[0].Value;
                            var Cutsheet = context.TLCUT_CutSheet.Find(Pk);

                            if (Cutsheet != null)
                            {
                                Cutsheet.TLCUTSH_RequiredDate = dtpFromDate.Value;
                            }
                        }

                        try
                        {
                            context.SaveChanges();
                            MessageBox.Show("Data successfully saved to database");
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message);
                            return;
                        }
                    }
                }
            }
        }