public static GovernmentOfficial GetDetails(string officialCode) { GovernmentOfficial info = null; info = BaseDataAccess.GetRecords <GovernmentOfficial>(string.Format("select * from GovernmentOfficials where OfficialCode='{0}'", officialCode)); if (info != null) { info.DepartmentDesignation = DepartmentDesignationDA.GetDetails(info.DesignationId); } return(info); }
public static List <GovernmentOfficial> GetAllByDesignation(int designationId) { List <GovernmentOfficial> list = null; list = BaseDataAccess.GetRecordsList <GovernmentOfficial>(String.Format("select * from GovernmentOfficials where DesignationId='{0}' ", designationId)); foreach (GovernmentOfficial info in list) { info.DepartmentDesignation = DepartmentDesignationDA.GetDetails(info.DesignationId); } return(list); }
public static DepartmentXOfficial GetDetails(int id) { DepartmentXOfficial info = null; info = BaseDataAccess.GetRecords <DepartmentXOfficial>(String.Format("select * from DepartmentXOfficials where Id='{0}'", id)); if (info != null) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.GovernmentOfficialId); info.DepartmentDesignation = DepartmentDesignationDA.GetDetails(info.DesignationId); } return(info); }
public static List <DepartmentXOfficial> GetAllForOfficial(int officialId) { List <DepartmentXOfficial> list = null; list = BaseDataAccess.GetRecordsList <DepartmentXOfficial>(String.Format("select * from DepartmentXOfficials where GovernmentOfficialId='{0}' ", officialId)); foreach (DepartmentXOfficial info in list) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.GovernmentOfficialId); info.DepartmentDesignation = DepartmentDesignationDA.GetDetails(info.DesignationId); } return(list); }
public static List <DepartmentXOfficial> GetAllByUsername(string userName) { List <DepartmentXOfficial> list = null; list = BaseDataAccess.GetRecordsList <DepartmentXOfficial>(String.Format("select * from DepartmentXOfficials where ContactNumber='{0}' ", userName)); foreach (DepartmentXOfficial info in list) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.GovernmentOfficialId); info.DepartmentDesignation = DepartmentDesignationDA.GetDetails(info.DesignationId); } return(list); }