private void LoadGRNType() { List <GRNTypeBLL> list = new List <GRNTypeBLL>(); GRNTypeBLL obj = new GRNTypeBLL(); try { list = obj.GetActiveGRNType(); //Load to cbo this.cboGRNType.Items.Clear(); this.cboGRNType.Items.Add(new ListItem("Please select GRN Type", "")); this.cboGRNType.AppendDataBoundItems = true; foreach (GRNTypeBLL o in list) { this.cboGRNType.Items.Add(new ListItem(o.Name, o.Id.ToString())); } } catch { this.lblmsg.Text = "Unable to Fullfill this request."; } }
public static List <GRNTypeBLL> GetActiveGRNTypes() { List <GRNTypeBLL> list; try { ECXLookUp.ECXLookup objEcxLookUp = new WarehouseApplication.ECXLookUp.ECXLookup(); ECXLookUp.CGRNType[] obj = objEcxLookUp.GetActiveGRNTypes(Utility.GetWorkinglanguage()); if (obj != null) { if (obj.Count() > 0) { list = new List <GRNTypeBLL>(); foreach (ECXLookUp.CGRNType i in obj) { GRNTypeBLL o = new GRNTypeBLL(); o.Id = i.UniqueIdentifier; o.Name = i.Name; list.Add(o); } return(list); } else { return(null); } } else { return(null); } } catch (Exception ex) { throw new Exception("Unable to Get GRN Types.", ex); } }