public List <GenericDropDownList> SetGroupList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); int previousGroup = 0; GenericDropDownList option = new GenericDropDownList(); option.text = ""; option.value = "0"; list.Add(option); foreach (var i in db.ITMGRPs.OrderBy(o => o.Group_Id)) { if (previousGroup == i.Group_Id) { continue; } previousGroup = i.Group_Id; option = new GenericDropDownList(); option.text = i.Group_Name; option.value = i.Group_Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetMDSPriceTierDropDown() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.MDS_Price_Tier) { GenericDropDownList option = new GenericDropDownList(); option.text = i.Price_Tier; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetMaterialsGroupList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.INVMGRP0) { GenericDropDownList option = new GenericDropDownList(); option.text = i.MGRTXT; option.value = i.MGRGRP; list.Add(option); } return(list); } }
public List <GenericDropDownList> SetUnitOfMeasureList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.INVUOMP0) { GenericDropDownList option = new GenericDropDownList(); option.text = i.UOMDEL; option.value = i.UOMDES; list.Add(option); } return(list); } }
public List <GenericDropDownList> SetCategoryList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.Categories) { GenericDropDownList option = new GenericDropDownList(); option.text = i.Category1; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetPMGList(String group) { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.CSHPMGP0.Where(o => o.PMGGRP.Equals(group))) { GenericDropDownList option = new GenericDropDownList(); option.text = i.PMGTXT; option.value = i.PMGNUM; list.Add(option); } return(list); } }
public List <GenericDropDownList> SetProfitCenterDropDown() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.PROFIT_CEN) { GenericDropDownList option = new GenericDropDownList(); option.text = i.PRFCNT; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetOwnershipDropDown() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); foreach (var i in db.OWNERSHIPs) { GenericDropDownList option = new GenericDropDownList(); option.text = i.OWNSHP; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetLocationDropDown() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); GenericDropDownList option = new GenericDropDownList(); option.text = ""; option.value = "0"; list.Add(option); foreach (var i in db.LOCATIONs) { option = new GenericDropDownList(); option.text = i.LOCATN; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetTradingAreaList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); GenericDropDownList option = new GenericDropDownList(); option.text = ""; option.value = "0"; list.Add(option); foreach (var i in db.Trading_Area) { option = new GenericDropDownList(); option.text = i.Trading_Areea; option.value = i.Id.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetPrimaryVendorList() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); GenericDropDownList option = new GenericDropDownList(); option.text = ""; option.value = "0"; list.Add(option); foreach (var i in db.INVVEMP0) { option = new GenericDropDownList(); option.text = i.VEMDS1; option.value = i.VEMVEN.ToString(); list.Add(option); } return(list); } }
public List <GenericDropDownList> SetStoreDropDown() { using (CFMMCDEntities db = new CFMMCDEntities()) { List <GenericDropDownList> list = new List <GenericDropDownList>(); GenericDropDownList option = new GenericDropDownList(); option.text = ""; option.value = "0"; list.Add(option); foreach (var i in db.Store_Profile) { option = new GenericDropDownList(); option.text = i.STORE_NAME; option.value = i.STORE_NO.ToString(); list.Add(option); } return(list); } }