public static DepartmentEscalationLevel GetDetailsByDepartmentId(int id, int LevelNumber) { DepartmentEscalationLevel info = null; info = BaseDataAccess.GetRecords <DepartmentEscalationLevel>(String.Format("select * from DepartmentEscalationLevels where DepartmentId='{0}' and LevelNumber = '{1}'", id, LevelNumber)); if (info != null) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.DesignatedOfficialId); } return(info); }
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 <DepartmentEscalationLevel> GetAllForDepartment(int departmentId) { List <DepartmentEscalationLevel> list = new List <DepartmentEscalationLevel>(); list = BaseDataAccess.GetRecordsList <DepartmentEscalationLevel>(String.Format("select * from DepartmentEscalationLevels where DepartmentId='{0}'", departmentId)); foreach (DepartmentEscalationLevel info in list) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.DesignatedOfficialId); } return(list); }
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); }
public static DepartmentXAreaIncharge GetDetails(int id) { DepartmentXAreaIncharge info = null; info = BaseDataAccess.GetRecords <DepartmentXAreaIncharge>(String.Format("select * from DepartmentXAreaIncharges where Id='{0}'", id)); info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.InchargeId); return(info); }
public static DepartmentXAreaOnDuty GetByTime(int departmentId, DateTime timeOfDay) { DepartmentXAreaOnDuty info = null; info = BaseDataAccess.GetRecords <DepartmentXAreaOnDuty>(String.Format("select * from DepartmentXAreaOnDuty where DepartmentId='{0}'", departmentId)); if (info != null) { info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovermentOfficial = GovernmentOfficialDA.GetDetails(info.OnDutyPersonId); } return(info); }
public static List <DepartmentXAreaOnDuty> GetAll() { List <DepartmentXAreaOnDuty> list = null; list = BaseDataAccess.GetRecordsList <DepartmentXAreaOnDuty>(String.Format("select * from DepartmentXAreaOnDuty ")); foreach (DepartmentXAreaOnDuty info in list) { info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovermentOfficial = GovernmentOfficialDA.GetDetails(info.OnDutyPersonId); } return(list); }
public static List <DepartmentXAreaIncharge> GetAllForDepartment(int departmentId) { List <DepartmentXAreaIncharge> list = null; list = BaseDataAccess.GetRecordsList <DepartmentXAreaIncharge>(String.Format("select * from DepartmentXAreaIncharges where departmentId='{0}' ", departmentId)); foreach (DepartmentXAreaIncharge info in list) { info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.GovernmentOfficial = GovernmentOfficialDA.GetDetails(info.InchargeId); } return(list); }
public static Complaint GetDetails(int id) { Complaint info = null; info = BaseDataAccess.GetRecords <Complaint>(String.Format("select * from Complaints where Id='{0}' ", id)); if (info != null) { info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.DepartmentType = DepartmentTypeDA.GetDetails(info.DepartmentTypeId); info.ComplaintType = ComplaintTypeDA.GetDetails(info.ComplaintTypeId); info.ComplaintStatus = ComplaintStatusDA.GetDetails(info.CurrentStatusId); info.Department = DepartmentDA.GetDetails(info.DepartmentId); } return(info); }
public static List <DepartmentXAreaOnDuty> GetAllByLocationAndDepartment(int localityId, int departmentId) { List <DepartmentXAreaOnDuty> list = null; list = BaseDataAccess.GetRecordsList <DepartmentXAreaOnDuty>(String.Format("select * from DepartmentXAreaOnDuty where LocalityId='{0}' and DepartmentId='{1}' ", localityId, departmentId)); foreach (DepartmentXAreaOnDuty info in list) { info.DutyTimeFrom = Convert.ToDateTime(info.DutyTimeFrom.ToString("hh:mm:ss")); info.DutyTimeTo = Convert.ToDateTime(info.DutyTimeTo.ToString("hh:mm:ss")); info.State = StateDA.GetDetails(info.StateId); info.City = CityDA.GetDetails(info.CityId); if (info.VillageId != 0) { info.Village = VillageDA.GetDetails(info.VillageId); } info.Locality = LocalityDA.GetDetails(info.LocalityId); info.Department = DepartmentDA.GetDetails(info.DepartmentId); info.GovermentOfficial = GovernmentOfficialDA.GetDetails(info.OnDutyPersonId); } return(list); }