Exemplo n.º 1
0
        private void frmCostingProfitability_Load(object sender, EventArgs e)
        {
            FormLoaded = false;
            using (var context = new TTI2Entities())
            {
                var Depts = context.TLADM_Departments.Where(x => x.Dep_IsCMT).OrderBy(x => x.Dep_Description).ToList();
                foreach (var Dept in Depts)
                {
                    cmboCMTs.Items.Add(new CMT.CheckComboBoxItem(Dept.Dep_Id, Dept.Dep_Description, false));
                }

                var Styles = context.TLADM_Styles.OrderBy(x => x.Sty_Description).ToList();
                foreach (var Style in Styles)
                {
                    cmboStyle.Items.Add(new CMT.CheckComboBoxItem(Style.Sty_Id, Style.Sty_Description, false));
                }

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

                var Sizes = context.TLADM_Sizes.Where(x => (bool)!x.SI_Discontinued).OrderBy(x => x.SI_DisplayOrder).ToList();
                foreach (var Size in Sizes)
                {
                    cmboSizes.Items.Add(new CMT.CheckComboBoxItem(Size.SI_id, Size.SI_Description, false));
                }
            }
            QueryParms = new CMT.CMTQueryParameters();
            FormLoaded = true;
        }
Exemplo n.º 2
0
        private void frmSelCSOnHold_Load(object sender, EventArgs e)
        {
            Formloaded = false;
            QueryParms = new CMTQueryParameters();

            using (var context = new TTI2Entities())
            {
                var Departments = context.TLADM_Departments.Where(x => x.Dep_IsCMT).OrderBy(x => x.Dep_Description).ToList();
                foreach (var Dep in Departments)
                {
                    cmboDepartments.Items.Add(new CMT.CheckComboBoxItem(Dep.Dep_Id, Dep.Dep_Description, false));
                }
            }
            Formloaded = true;
        }