Exemplo n.º 1
0
        private void frmSuggestedKO_Load(object sender, EventArgs e)
        {
            formloaded = false;

            QueryParms = new ProdQueryParameters();
            repo       = new PPSRepository();

            using (var context = new TTI2Entities())
            {
                var Dept = context.TLADM_Departments.Where(x => x.Dep_ShortCode.Contains("KNIT")).FirstOrDefault();
                if (Dept != null)
                {
                    var ExistingMachines = context.TLADM_MachineDefinitions.Where(x => x.MD_Department_FK == Dept.Dep_Id).OrderBy(x => x.MD_MachineCode).ToList();
                    foreach (var record in ExistingMachines)
                    {
                        cmboMachine.Items.Add(new ProductionPlanning.CheckComboBoxItem(record.MD_Pk, record.MD_Description, false));
                    }

                    var ExistingGreige = context.TLADM_Griege.ToList();
                    foreach (var record in ExistingGreige)
                    {
                        cmboGreige.Items.Add(new ProductionPlanning.CheckComboBoxItem(record.TLGreige_Id, record.TLGreige_Description, false));
                    }

                    var ExistingQuality = context.TLADM_GreigeQuality.ToList();
                    foreach (var record in ExistingQuality)
                    {
                        cmboGreigeQuality.Items.Add(new ProductionPlanning.CheckComboBoxItem(record.GQ_Pk, record.GQ_Description, false));
                    }
                }

                formloaded = true;
            }
        }
Exemplo n.º 2
0
        public frmPlanningKnitStock()
        {
            InitializeComponent();

            repo = new PPSRepository();
            //--------------------------------------------------------
            // wire up the check state changed event
            //--------------------------------------------------------------------------------------------------------
            this.cmboGreige.CheckStateChanged        += new System.EventHandler(this.cmboGreige_CheckStateChanged);
            this.cmboGreigeQuality.CheckStateChanged += new System.EventHandler(this.cmboGreigeQuality_CheckStateChanged);
            this.cmboFabWeight.CheckStateChanged     += new System.EventHandler(this.cmboFabWeight_CheckStateChanged);
            this.cmboFabWidth.CheckStateChanged      += new System.EventHandler(this.cmboFabWidth_CheckStateChanged);
            this.cmboStore.CheckStateChanged         += new System.EventHandler(this.cmboStore_CheckStateChanged);
        }
Exemplo n.º 3
0
        private void frmSelReorderDetails_Load(object sender, EventArgs e)
        {
            formloaded = false;
            repo       = new PPSRepository();
            parms      = new ProdQueryParameters();

            using (var context = new TTI2Entities())
            {
                var Customers = context.TLADM_CustomerFile.OrderBy(x => x.Cust_Description).ToList();
                foreach (var Customer in Customers)
                {
                    cmboCustomers.Items.Add(new ProductionPlanning.CheckComboBoxItem(Customer.Cust_Pk, Customer.Cust_Description, false));
                }

                var Styles = context.TLADM_Styles.ToList();
                foreach (var Style in Styles)
                {
                    cmboStyles.Items.Add(new ProductionPlanning.CheckComboBoxItem(Style.Sty_Id, Style.Sty_Description, false));
                }

                var Colours = context.TLADM_Colours.OrderBy(x => x.Col_Display).ToList();
                foreach (var Colour in Colours)
                {
                    cmboColours.Items.Add(new ProductionPlanning.CheckComboBoxItem(Colour.Col_Id, Colour.Col_Display, false));
                }

                var Sizes = context.TLADM_Sizes.OrderBy(x => x.SI_DisplayOrder).ToList();
                foreach (var Size in Sizes)
                {
                    cmboSizes.Items.Add(new ProductionPlanning.CheckComboBoxItem(Size.SI_id, Size.SI_Description, false));
                }
            }

            //--------------------------------------------------------
            // wire up the check state changed event
            //--------------------------------------------------------------------------------------------------------
            this.cmboCustomers.CheckStateChanged += new System.EventHandler(this.cmboCustomer_CheckStateChanged);
            this.cmboStyles.CheckStateChanged    += new System.EventHandler(this.cmboStyles_CheckStateChanged);
            this.cmboColours.CheckStateChanged   += new System.EventHandler(this.cmboColours_CheckStateChanged);
            this.cmboSizes.CheckStateChanged     += new System.EventHandler(this.cmboSizes_CheckStateChanged);


            formloaded = true;
        }
Exemplo n.º 4
0
        private void PlanningKnitStock_Load(object sender, EventArgs e)
        {
            formloaded = false;

            QueryParms = new ProdQueryParameters();
            repo       = new PPSRepository();

            using (var context = new TTI2Entities())
            {
                var Dept = context.TLADM_Departments.Where(x => x.Dep_ShortCode.Contains("KNIT")).FirstOrDefault();
                if (Dept != null)
                {
                    cmboGreige.DataSource    = context.TLADM_Griege.ToList();
                    cmboGreige.ValueMember   = "TLGreige_Id";
                    cmboGreige.DisplayMember = "TLGreige_Description";
                    cmboGreige.SelectedIndex = -1;

                    cmboGreigeQuality.DataSource    = context.TLADM_GreigeQuality.ToList();
                    cmboGreigeQuality.ValueMember   = "GQ_Pk";
                    cmboGreigeQuality.DisplayMember = "GQ_Description";
                    cmboGreigeQuality.SelectedIndex = -1;

                    cmboFabWeight.DataSource    = context.TLADM_FabricWeight.ToList();
                    cmboFabWeight.ValueMember   = "FWW_Id";
                    cmboFabWeight.DisplayMember = "FWW_Description";
                    cmboFabWeight.SelectedIndex = -1;

                    cmboFabWidth.DataSource    = context.TLADM_FabWidth.ToList();
                    cmboFabWidth.ValueMember   = "FW_Id";
                    cmboFabWidth.DisplayMember = "FW_description";
                    cmboFabWidth.SelectedIndex = -1;

                    cmboStore.DataSource    = context.TLADM_WhseStore.Where(x => x.WhStore_DepartmentFK == Dept.Dep_Id && !x.WhStore_WhseOrStore).ToList();
                    cmboStore.ValueMember   = "WhStore_Id";
                    cmboStore.DisplayMember = "WhStore_Description";
                    cmboStore.SelectedIndex = -1;
                }

                formloaded = true;
            }
        }