public void BindGrid() { iDepartmentMasterClient document = new iDepartmentMasterClient(); try { long UserID = 540; CustomProfile profile = CustomProfile.GetProfile(); grddocument.DataSource = document.GetDocumentTypeList(profile.DBConnection._constr); grddocument.DataBind(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Designation Master", "BindGrid"); } finally { } }
public static List <contact> GetDepartmentByCustID(object objReq) { iStatutoryMasterClient StatutoryClient = new iStatutoryMasterClient(); iDepartmentMasterClient Department = new iDepartmentMasterClient(); CustomProfile profile = CustomProfile.GetProfile(); DataSet ds = new DataSet(); DataTable dt = new DataTable(); List <contact> LocList = new List <contact>(); try { Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary = (Dictionary <string, object>)objReq; long ddlcustomerID = long.Parse(dictionary["ddlcustomerId"].ToString()); //ds = StatutoryClient.GetCustomerList(ddlcompanyId, profile.DBConnection._constr); ds = Department.GetDeptByCustomerID(ddlcustomerID, profile.DBConnection._constr); dt = ds.Tables[0]; contact Loc = new contact(); Loc.Name = "--Select--"; Loc.Id = "0"; LocList.Add(Loc); Loc = new contact(); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { Loc.Id = dt.Rows[i]["ID"].ToString(); Loc.Name = dt.Rows[i]["Name"].ToString(); LocList.Add(Loc); Loc = new contact(); } } } catch { } finally { StatutoryClient.Close(); } return(LocList); }