Ejemplo n.º 1
0
        public frmViewFabricSales()
        {
            InitializeComponent();

            repo = new DyeRepository();

            this.comboColour.CheckStateChanged    += new System.EventHandler(this.comboColour_CheckStateChanged);
            this.comboCustomers.CheckStateChanged += new EventHandler(this.comboCustomers_CheckStateChanged);
            this.comboQuality.CheckStateChanged   += new System.EventHandler(this.comboQuality_CheckStateChanged);
        }
Ejemplo n.º 2
0
        DataGridViewTextBoxColumn selectc;  // 4  Liquid Ratios

        public frmTLDYEReceipe()
        {
            InitializeComponent();

            core = new Util();

            MandatoryFields = new string[][]
            {
                new string[] { "txtProductCode", "Please enter a PROG number", "0" }
            };

            MandatoryRows = new string[][]
            { new string[] { "1", "Please select a consumable", "0" },
              new string[] { "2", "Please Tick a Grams", "1" },
              new string[] { "3", "Please enter a MEL/FLC amount", "2" },
              new string[] { "4", "Please enter a LIQ Ratio", "3" } };

            selecta           = new DataGridViewTextBoxColumn(); // record index
            selecta.Visible   = false;
            selecta.ValueType = typeof(System.Int32);

            oCmboA            = new DataGridViewComboBoxColumn(); // Consumables foreign Key
            oCmboA.HeaderText = "Consumables";
            oCmboA.Width      = 150;

            oChkA            = new DataGridViewCheckBoxColumn();
            oChkA.HeaderText = "g/l";
            oChkA.ValueType  = typeof(Boolean);

            selectb            = new DataGridViewTextBoxColumn(); //  Mel / FC value
            selectb.HeaderText = "Chemical Ratios to Program Load";
            selectb.ValueType  = typeof(decimal);

            selectc            = new DataGridViewTextBoxColumn(); //  Liquid Ratio's
            selectc.HeaderText = "Liquid Ratios";
            selectc.ValueType  = typeof(int);
            selectc.Width      = 150;

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.Columns.Add(selecta);
            dataGridView1.Columns.Add(oCmboA);
            dataGridView1.Columns.Add(oChkA);
            dataGridView1.Columns.Add(selectb);
            dataGridView1.Columns.Add(selectc);

            dataGridView1.EditingControlShowing      += new DataGridViewEditingControlShowingEventHandler(dataGridView1_EditingControlShowing);
            this.cmboGreigeQuality.CheckStateChanged += new System.EventHandler(this.cmboQuality_CheckStateChanged);

            repo = new DyeRepository();

            SetUp();
        }
Ejemplo n.º 3
0
        public frmViewCommissionReceipts()
        {
            InitializeComponent();

            oTxtBoxA.HeaderText = "Grn No";
            oTxtBoxA.ValueType  = typeof(string);
            oTxtBoxA.ReadOnly   = true;

            oTxtBoxB.HeaderText = "Grn Date";
            oTxtBoxB.ValueType  = typeof(DateTime);
            oTxtBoxB.ReadOnly   = true;

            oTxtBoxC.HeaderText = "Cust Doc";
            oTxtBoxC.ValueType  = typeof(string);
            oTxtBoxC.ReadOnly   = true;

            oTxtBoxD.HeaderText = "Quality";
            oTxtBoxD.ValueType  = typeof(string);
            oTxtBoxD.ReadOnly   = true;

            oTxtBoxE.HeaderText = "Cust  Order";
            oTxtBoxE.ValueType  = typeof(string);
            oTxtBoxE.ReadOnly   = true;

            oTxtBoxF.HeaderText = "Total Items";
            oTxtBoxF.ValueType  = typeof(int);
            oTxtBoxF.ReadOnly   = true;

            oTxtBoxG.HeaderText = "Nett Weight";
            oTxtBoxG.ValueType  = typeof(decimal);
            oTxtBoxG.ReadOnly   = true;

            repo = new DyeRepository();

            dataGridView1.Columns.Add(oTxtBoxA);
            dataGridView1.Columns.Add(oTxtBoxB);
            dataGridView1.Columns.Add(oTxtBoxC);
            dataGridView1.Columns.Add(oTxtBoxD);
            dataGridView1.Columns.Add(oTxtBoxE);
            dataGridView1.Columns.Add(oTxtBoxF);
            dataGridView1.Columns.Add(oTxtBoxG);

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

            this.comboCustomers.CheckStateChanged += new EventHandler(this.comboCustomers_CheckStateChanged);
            this.comboQuality.CheckStateChanged   += new System.EventHandler(this.comboQuality_CheckStateChanged);
        }
Ejemplo n.º 4
0
        //Stage 3 Colour Matching after Dyeing
        //Stage 4 Stability Check after Drying;
        //Stage 5 Results Check after Compacting;

        public frmShadeAfterDyeing(int Stage)
        {
            InitializeComponent();
            _Stage = Stage;
            if (Stage == 3)
            {
                this.Text = "Colour matching after dyeing";
            }
            else if (Stage == 4)
            {
                this.Text               = "Stability check after drying";
                this.rbAll.Visible      = false;
                this.rbRejected.Visible = false;

                label7.Visible            = false;
                cmboCause.Visible         = false;
                label8.Visible            = false;
                cmboRemedy.Visible        = false;
                cmboReportOptions.Visible = false;
            }
            else if (Stage == 5)
            {
                this.Text = "QA check after compacting";
                this.rbRejected.Visible = false;
                this.rbAll.Visible      = false;

                label7.Visible            = false;
                cmboCause.Visible         = false;
                label8.Visible            = false;
                cmboRemedy.Visible        = false;
                cmboReportOptions.Visible = false;
            }

            repo = new DyeRepository();
            //--------------------------------------------------------
            // wire up the check state changed event
            //--------------------------------------------------------------------------------------------------------
            this.cmboQuality.CheckStateChanged    += new System.EventHandler(this.cmboGreige_CheckStateChanged);
            this.cmboColour.CheckStateChanged     += new System.EventHandler(this.cmboColours_CheckStateChanged);
            this.cmboCause.CheckStateChanged      += new System.EventHandler(this.cmboCauses_CheckStateChanged);
            this.cmboRemedy.CheckStateChanged     += new System.EventHandler(this.cmboRemedys_CheckStateChanged);
            this.cmboDyeMachine.CheckStateChanged += new System.EventHandler(this.cmboDyeMachines_CheckStateChanged);
            this.cmboRemedy.CheckStateChanged     += new System.EventHandler(this.cmboRemedys_CheckStateChanged);
        }
Ejemplo n.º 5
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                DyeHouse.DyeRepository      repo       = new DyeRepository();
                DyeHouse.DyeQueryParameters QueryParms = new DyeQueryParameters();

                QueryParms.FromDate = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                QueryParms.ToDate   = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                QueryParms.ToDate   = QueryParms.ToDate.AddHours(23);

                frmDyeViewReport vRep = new frmDyeViewReport(44, QueryParms);
                int h = Screen.PrimaryScreen.WorkingArea.Height;
                int w = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }
Ejemplo n.º 6
0
        private void frmProductionPlanDC_Load(object sender, EventArgs e)
        {
            formloaded = false;

            repo       = new DyeRepository();
            QueryParms = new DyeQueryParameters();

            using (var context = new TTI2Entities())
            {
                var Entries = context.TLDYE_DyeBatch.Where(x => !x.DYEB_Allocated && !x.DYEB_Closed).OrderBy(x => x.DYEB_BatchNo).ToList();
                foreach (var Entry in Entries)
                {
                    cmboDyeBatches.Items.Add(new DyeHouse.CheckComboBoxItem(Entry.DYEB_Pk, Entry.DYEB_BatchNo, false));
                }

                cmboDyeBatches.ValueMember   = "DYEB_PK";
                cmboDyeBatches.DisplayMember = "DYEB_BatchNo";
            }

            formloaded = true;
        }
Ejemplo n.º 7
0
        public frmTransferToDyeHouse()
        {
            InitializeComponent();

            DataGridViewTextBoxColumn  oTxtA = new DataGridViewTextBoxColumn();  // Primary Key (DYE Batch)          0
            DataGridViewCheckBoxColumn oChkA = new DataGridViewCheckBoxColumn(); // Check box select which record    1                    2
            DataGridViewTextBoxColumn  oTxtB = new DataGridViewTextBoxColumn();  // Batch                            2
            DataGridViewTextBoxColumn  oTxtC = new DataGridViewTextBoxColumn();  // Colour                           3
            DataGridViewTextBoxColumn  oTxtD = new DataGridViewTextBoxColumn();  // Week Due                         4
            DataGridViewTextBoxColumn  oTxtE = new DataGridViewTextBoxColumn();  // Style                            5
            DataGridViewTextBoxColumn  oTxtF = new DataGridViewTextBoxColumn();  // Greige Weight                    6
            DataGridViewTextBoxColumn  oTxtG = new DataGridViewTextBoxColumn();  // Greige Weight                    7

            repo = new DyeRepository();

            oTxtA.HeaderText = "Primary Key";
            oTxtA.Visible    = false;
            oTxtA.ValueType  = typeof(int);
            oTxtA.ReadOnly   = true;

            dataGridView1.Columns.Add(oTxtA);

            oChkA.HeaderText = "Please Select a Record";
            oChkA.Visible    = true;
            oChkA.ValueType  = typeof(Boolean);
            dataGridView1.Columns.Add(oChkA);

            oTxtB.HeaderText = "Batch No";
            oTxtB.ValueType  = typeof(string);
            oTxtB.ReadOnly   = true;
            dataGridView1.Columns.Add(oTxtB);

            oTxtC.HeaderText = "Date";
            oTxtC.ValueType  = typeof(DateTime);
            oTxtC.ReadOnly   = true;
            dataGridView1.Columns.Add(oTxtC);

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

            oTxtE.HeaderText = "Week Due";
            oTxtE.ValueType  = typeof(Int32);
            oTxtE.ReadOnly   = true;
            dataGridView1.Columns.Add(oTxtE);

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

            oTxtG.HeaderText = "Weight";
            oTxtG.ValueType  = typeof(decimal);
            oTxtG.ReadOnly   = true;
            dataGridView1.Columns.Add(oTxtG);


            dataGridView1.AllowUserToAddRows  = false;
            dataGridView1.AutoGenerateColumns = false;

            Core = new Util();

            this.cmboBatches.CheckStateChanged       += new System.EventHandler(this.cmboBatches_CheckStateChanged);
            this.cmboColour.CheckStateChanged        += new EventHandler(this.cmboColour_CheckStateChanged);
            this.cmboFabricQuality.CheckStateChanged += new System.EventHandler(this.cmboFabricQuality_CheckStateChanged);
            this.cmboFabricWeight.CheckStateChanged  += new EventHandler(this.cmboFabricWeight_CheckStateChanged);
            this.cmboFabricWidth.CheckStateChanged   += new EventHandler(this.comboFabricWidth_CheckStateChanged);
        }
Ejemplo n.º 8
0
        public frmViewDyeOrder()
        {
            InitializeComponent();
            repo = new DyeRepository();
            oTxtBoxA.HeaderText = "pk";
            oTxtBoxA.ValueType  = typeof(int);
            oTxtBoxA.Visible    = false;

            oChkA.HeaderText = "Select";
            oChkA.ValueType  = typeof(bool);
            oChkA.Visible    = true;

            oTxtBoxB.HeaderText = "DyeOrder No";
            oTxtBoxB.ValueType  = typeof(string);
            oTxtBoxB.ReadOnly   = true;

            oTxtBoxC.HeaderText = "DyeOrder Date";
            oTxtBoxC.ValueType  = typeof(DateTime);
            oTxtBoxC.ReadOnly   = true;

            oTxtBoxD.HeaderText = "Customer";
            oTxtBoxD.ValueType  = typeof(string);
            oTxtBoxD.ReadOnly   = true;

            oTxtBoxE.HeaderText = "Style";
            oTxtBoxE.ValueType  = typeof(string);
            oTxtBoxE.ReadOnly   = true;

            oTxtBoxF.HeaderText = "Quality";
            oTxtBoxF.ValueType  = typeof(string);
            oTxtBoxF.ReadOnly   = true;

            oTxtBoxG.HeaderText = "Colour";
            oTxtBoxG.ValueType  = typeof(string);
            oTxtBoxG.ReadOnly   = true;

            oTxtBoxH.HeaderText = "Lable";
            oTxtBoxH.ValueType  = typeof(string);
            oTxtBoxH.ReadOnly   = true;

            oTxtBoxJ.HeaderText = "Notes";
            oTxtBoxJ.ValueType  = typeof(string);
            oTxtBoxJ.ReadOnly   = true;



            dataGridView1.Columns.Add(oTxtBoxA);    //0
            dataGridView1.Columns.Add(oChkA);       //1
            dataGridView1.Columns.Add(oTxtBoxB);    //2
            dataGridView1.Columns.Add(oTxtBoxC);    //3
            dataGridView1.Columns.Add(oTxtBoxD);    //4
            dataGridView1.Columns.Add(oTxtBoxE);    //5
            dataGridView1.Columns.Add(oTxtBoxF);    //6
            dataGridView1.Columns.Add(oTxtBoxG);    //7
            dataGridView1.Columns.Add(oTxtBoxH);    //8
            dataGridView1.Columns.Add(oTxtBoxJ);    //9


            dataGridView1.AutoGenerateColumns      = false;
            dataGridView1.AllowUserToAddRows       = false;
            dataGridView1.AllowUserToOrderColumns  = false;
            this.comboColour.CheckStateChanged    += new System.EventHandler(this.comboColour_CheckStateChanged);
            this.comboCustomers.CheckStateChanged += new EventHandler(this.comboCustomers_CheckStateChanged);
            this.comboQuality.CheckStateChanged   += new System.EventHandler(this.comboQuality_CheckStateChanged);
            this.comboStyles.CheckStateChanged    += new System.EventHandler(this.comboStyles_CheckStateChanged);
        }
Ejemplo n.º 9
0
        public frmViewDyeBatches(bool Vw)
        {
            InitializeComponent();

            ViewData = Vw;

            repo = new DyeRepository();

            if (ViewData)
            {
                this.Text = "View Dye Batches - To Screen";
            }
            else
            {
                this.Text = "View Dye Batches - To Printer";
            }

            oTxtBoxA.HeaderText = "pk";
            oTxtBoxA.ValueType  = typeof(int);
            oTxtBoxA.Visible    = false;

            oChkA.HeaderText = "Select";
            oChkA.ValueType  = typeof(bool);
            oChkA.Visible    = true;

            oTxtBoxB.HeaderText = "DyeBatch No";
            oTxtBoxB.ValueType  = typeof(string);
            oTxtBoxB.ReadOnly   = true;

            oTxtBoxC.HeaderText = "DyeBatch Date";
            oTxtBoxC.ValueType  = typeof(DateTime);
            oTxtBoxC.ReadOnly   = true;

            oTxtBoxD.HeaderText = "DyeBatch Required Date";
            oTxtBoxD.ValueType  = typeof(DateTime);
            oTxtBoxD.ReadOnly   = true;

            oTxtBoxE.HeaderText = "DyeBatch Weight";
            oTxtBoxE.ValueType  = typeof(decimal);
            oTxtBoxE.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            oTxtBoxE.ReadOnly = true;

            oTxtBoxF.HeaderText = "Notes";
            oTxtBoxF.ValueType  = typeof(string);
            oTxtBoxF.ReadOnly   = true;

            oTxtBoxG.HeaderText = "Closed";
            oTxtBoxG.ValueType  = typeof(string);
            oTxtBoxG.ReadOnly   = true;

            oTxtBoxH.HeaderText = "Transfer";
            oTxtBoxH.ValueType  = typeof(string);
            oTxtBoxH.ReadOnly   = true;

            oTxtBoxJ.HeaderText = "Allocated";
            oTxtBoxJ.ValueType  = typeof(string);
            oTxtBoxJ.ReadOnly   = true;

            oTxtBoxK.HeaderText = "Dyeing";
            oTxtBoxK.ValueType  = typeof(string);
            oTxtBoxK.ReadOnly   = true;

            oTxtBoxL.HeaderText = "Drying";
            oTxtBoxL.ValueType  = typeof(string);
            oTxtBoxL.ReadOnly   = true;

            oTxtBoxM.HeaderText = "Compacting";
            oTxtBoxM.ValueType  = typeof(string);
            oTxtBoxM.ReadOnly   = true;

            oTxtBoxN.HeaderText = "Out of Process";
            oTxtBoxN.ValueType  = typeof(string);
            oTxtBoxN.ReadOnly   = true;

            oTxtBoxP.HeaderText = "Quality";
            oTxtBoxP.ValueType  = typeof(string);
            oTxtBoxP.ReadOnly   = true;

            oTxtBoxQ.HeaderText = "Colour";
            oTxtBoxQ.ValueType  = typeof(string);
            oTxtBoxQ.ReadOnly   = true;

            dataGridView1.Columns.Add(oTxtBoxA);
            dataGridView1.Columns.Add(oChkA);
            dataGridView1.Columns.Add(oTxtBoxB);
            dataGridView1.Columns.Add(oTxtBoxC);
            dataGridView1.Columns.Add(oTxtBoxD);
            dataGridView1.Columns.Add(oTxtBoxE);
            dataGridView1.Columns.Add(oTxtBoxF);
            dataGridView1.Columns.Add(oTxtBoxG);
            dataGridView1.Columns.Add(oTxtBoxH);
            dataGridView1.Columns.Add(oTxtBoxJ);
            dataGridView1.Columns.Add(oTxtBoxK);
            dataGridView1.Columns.Add(oTxtBoxL);
            dataGridView1.Columns.Add(oTxtBoxM);
            dataGridView1.Columns.Add(oTxtBoxN);
            dataGridView1.Columns.Add(oTxtBoxP);
            dataGridView1.Columns.Add(oTxtBoxQ);

            dataGridView1.AutoGenerateColumns     = false;
            dataGridView1.AllowUserToAddRows      = false;
            dataGridView1.AllowUserToOrderColumns = false;

            if (!ViewData)
            {
                dataGridView1.Visible = false;
            }

            this.comboColour.CheckStateChanged    += new System.EventHandler(this.comboColour_CheckStateChanged);
            this.comboCustomers.CheckStateChanged += new EventHandler(this.comboCustomers_CheckStateChanged);
            this.comboQuality.CheckStateChanged   += new System.EventHandler(this.comboQuality_CheckStateChanged);
        }
Ejemplo n.º 10
0
        public frmSelReceipeDefinitions()
        {
            InitializeComponent();

            repo = new DyeRepository();
        }