public static List <ComplaintXStatus> GetAllByStatus(int StatusId) { List <ComplaintXStatus> list = null; list = BaseDataAccess.GetRecordsList <ComplaintXStatus>(String.Format("select * from ComplaintXStatus where Status='{0}' ", StatusId)); foreach (ComplaintXStatus info in list) { info.Complaint = ComplaintDA.GetDetails(info.ComplaintId); info.ComplaintStatus = ComplaintStatusDA.GetDetails(info.StatusId); } return(list); }
public static List <Complaint> GetAllByAdhar(string Adhar) { List <Complaint> list = null; list = BaseDataAccess.GetRecordsList <Complaint>(String.Format("select * from Complaints where ReportingPersonAdhaarId='{0}' ", Adhar)); foreach (Complaint 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.DepartmentType = DepartmentTypeDA.GetDetails(info.DepartmentTypeId); info.ComplaintType = ComplaintTypeDA.GetDetails(info.ComplaintTypeId); info.ComplaintStatus = ComplaintStatusDA.GetDetails(info.CurrentStatusId); } return(list); }
public static List <Complaint> GetAllByDateRange(int departmentId) { List <Complaint> list = null; list = BaseDataAccess.GetRecordsList <Complaint>(String.Format("select * from Complaints where departmentId={0}", departmentId)); foreach (Complaint 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.DepartmentType = DepartmentTypeDA.GetDetails(info.DepartmentTypeId); info.ComplaintType = ComplaintTypeDA.GetDetails(info.ComplaintTypeId); info.ComplaintStatus = ComplaintStatusDA.GetDetails(info.CurrentStatusId); } 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); }