public ItemsModel(COPR16Entities dbModel) { db = dbModel; this.FG_LIST = new List <SelectListItem>(); this.FGTYPE_LIST = new List <SelectListItem>(); this.BRAND_LIST = new List <SelectListItem>(); this.MODEL_LIST = new List <SelectListItem>(); this.LINE_LIST = new List <SelectListItem>(); this.POSITION_LIST = new List <SelectListItem>(); foreach (var row in db.COPR16_FG_MSTR.Where(l => l.FLGACT == true)) { FG_LIST.Add(new SelectListItem { Text = row.FG_NO, Value = row.FG_NO }); } foreach (var row in db.COPR16_BRAND_MSTR.Where(l => l.FLGACT == true)) { BRAND_LIST.Add(new SelectListItem { Text = row.BRAND_ID, Value = row.BRAND_ID }); } foreach (var row in db.COPR16_MODEL_MSTR.Where(l => l.FLGACT == true)) { MODEL_LIST.Add(new SelectListItem { Text = row.MODEL_ID, Value = row.MODEL_ID }); } foreach (var row in db.COPR16_LINE_MSTR.Where(l => l.FLGACT == true)) { LINE_LIST.Add(new SelectListItem { Text = row.LINE_ID, Value = row.LINE_ID }); } foreach (var row in db.COPR16_POSITION_MSTR.Where(l => l.FLGACT == true)) { POSITION_LIST.Add(new SelectListItem { Text = row.POS_ID, Value = row.POS_ID }); } foreach (var row in db.COPR16_FGTYPE_MSTR.Where(l => l.FLGACT == true)) { FGTYPE_LIST.Add(new SelectListItem { Text = row.FGT_ID, Value = row.FGT_ID }); } }
public CopRunningModel(COPR16Entities dbModel) { db = dbModel; SPC_YEAR = new List <SelectListItem>(); SPC_MODEL_LIST = new List <SelectListItem>(); this.WRK_LIST = new List <SelectListItem>(); this.MODEL_LIST = new List <SelectListItem>(); this.LINE_LIST = new List <SelectListItem>(); this.POSITION_LIST = new List <SelectListItem>(); this.PROC_LIST = new List <SelectListItem>(); this.PROC_LIST_Short = new List <SelectListItem>(); this.STATUS_LIST = new List <cop_status>(); statusList = new List <SelectListItem>(); STDREG = new List <SelectListItem>(); foreach (var row in db.COPR16_STDREG_MSTR.Where(l => l.FLGACT == true)) { STDREG.Add(new SelectListItem { Text = row.STDREG_NAME, Value = row.STDREG_ID }); } foreach (var row in db.COPR16_WORKFLOW.Where(l => l.FLGACT == true)) { WRK_LIST.Add(new SelectListItem { Text = row.WRK_NAME, Value = row.WRK_ID }); } foreach (var row in db.COPR16_MODEL_MSTR.Where(l => l.FLGACT == true)) { MODEL_LIST.Add(new SelectListItem { Text = row.MODEL_DESC, Value = row.MODEL_ID }); } foreach (var row in db.COPR16_LINE_MSTR.Where(l => l.FLGACT == true)) { LINE_LIST.Add(new SelectListItem { Text = row.LINE_DESC, Value = row.LINE_ID }); } foreach (var row in db.COPR16_POSITION_MSTR.Where(l => l.FLGACT == true)) { POSITION_LIST.Add(new SelectListItem { Text = row.POS_DESC, Value = row.POS_ID }); } foreach (var row in db.COPR16_PROC_MSTR.Where(l => l.FLGACT == true)) { PROC_LIST.Add(new SelectListItem { Text = row.PROC_NAME, Value = row.PROC_ID }); } foreach (var row in db.COPR16_PROC_MSTR.Where(l => l.FLGACT == true)) { PROC_LIST_Short.Add(new SelectListItem { Text = row.PROC_NAME, Value = row.PROC_ID }); } statusList.Add(new SelectListItem { Text = "--ALL--", Value = "ALL" }); this.STATUS_LIST.Add(new cop_status { text = "NEW", value = "NEW", step_status = false, job_status = true, color = "#" }); this.STATUS_LIST.Add(new cop_status { text = "READY", value = "READY", step_status = false, job_status = true, color = "#5cb85c" }); this.STATUS_LIST.Add(new cop_status { text = "WAIT", value = "WAIT", step_status = true, job_status = true, color = "#ffe764" }); this.STATUS_LIST.Add(new cop_status { text = "QUEUE", value = "QUEUE", step_status = true, job_status = false, color = "#ffe764" }); this.STATUS_LIST.Add(new cop_status { text = "TESTING", value = "TESTING", step_status = true, job_status = true, color = "#15aaf6", fcolor = "#ffffff" }); this.STATUS_LIST.Add(new cop_status { text = "ABORT", value = "ABORT", step_status = true, job_status = false, color = "#d9534f" }); this.STATUS_LIST.Add(new cop_status { text = "RE-TEST", value = "RE-TEST", step_status = true, job_status = false, color = "#15aaf6" }); this.STATUS_LIST.Add(new cop_status { text = "FINISHED", value = "FINISHED", step_status = true, job_status = false, color = "#42dc95" }); this.STATUS_LIST.Add(new cop_status { text = "COMPLETED", value = "COMPLETED", step_status = false, job_status = true, color = "#42dc95" }); this.STATUS_LIST.Add(new cop_status { text = "CANCELED", value = "CANCELED", step_status = false, job_status = true, color = "#d9534f" }); this.STATUS_LIST.Add(new cop_status { text = "APPROVED", value = "APPROVED", step_status = false, job_status = true, color = "#42dc00" }); foreach (var item in STATUS_LIST) { statusList.Add(new SelectListItem { Text = item.text, Value = item.value }); } }