public MadarsaLandRequestModel GetByRequestSubmitId(int id) { MadarsaLandRequestModel varList = new MadarsaLandRequestModel(); var item = tbl_MadarsaLandRequest.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault(); item = item ?? new MadarsaLandRequest(); varList = new MadarsaLandRequestModel { Id = item.Id, ShortDescription = item.ShortDescription, Location = item.Location, Area = item.Area, TimePeriod = item.TimePeriod, AmountPaid = item.AmountPaid, AmountNeeded = item.AmountNeeded, LandArea = item.LandArea, LandPrice = item.LandPrice, PurchasingFrom = item.PurchasingFrom, Doc1 = item.Doc1, Doc2 = item.Doc2, Doc3 = item.Doc3, Pic1 = item.Pic1, Pic2 = item.Pic2, Pic3 = item.Pic3, Status = item.Status, CreatedDate = item.CreatedDate, UserId = item.UserId, UserName = (item.User != null) ? item.User.Name : string.Empty, MadarsaId = item.MadarsaId, MadarsaName = (item.Madarsa != null) ? item.Madarsa.Name : string.Empty, RequestTypeId = item.RequestTypeId, RequestTypeName = (item.RequestType != null) ? item.RequestType.Name : string.Empty, RequestSubmitId = item.RequestSubmitId, }; RequestCommentBs obj = new RequestCommentBs(); var BoardComments = obj.BoardCommentList(id).ToList(); varList.BoardCommentList = BoardComments; var PannelComments = obj.PanelCommentList(id).ToList(); varList.PanelCommentList = PannelComments; RequestApproveRejectBs obj1 = new RequestApproveRejectBs(); varList.ApprovedList = obj1.ApproveRejectDisplay(id).ToList(); PanelInvolveBs panelobject = new PanelInvolveBs(); varList.PannelMemberInvolved = panelobject.InvolveList(id).ToList(); return(varList); }
public UserCategoryMappingModel GetById(int id) { return(_userCategory.GetAll().Where(x => x.ID == id).Select(x => new UserCategoryMappingModel { Id = x.ID, CategoryID = Convert.ToInt32(x.CategoryID), UserID = Convert.ToInt32(x.UserID), IsSelected = Convert.ToBoolean(x.IsSelected) }).FirstOrDefault()); }
public LoginModel GetById(int id) { return(_User.GetAll().Where(x => x.Id == id).Select(x => new CommonLayer.CommonModels.LoginModel { Id = x.Id, Name = x.Name, DeviceID = x.DeviceID, Platform = x.Platform, Area = x.Area, }).FirstOrDefault()); }
public EventRequestDetailModel GetEventDetailsId(int id) { return(_EventRequestDetail.GetAll().Where(x => x.Id == id).Select(x => new EventRequestDetailModel { Id = x.Id, SpeakerName = x.SpeakerName, Date = x.Date, Time = x.Time, CreatedDate = x.CreatedDate, EventRequestId = x.EventRequestId, }).FirstOrDefault()); }
public List <NewMadarsaOperationsRequestModel> NewMadarsaOperationRequestList() { List <NewMadarsaOperationsRequestModel> _varList = new List <NewMadarsaOperationsRequestModel>(); var varData = tbl_NewMadarsaOperationsRequestModel.GetAll().ToList(); _varList = (from item in varData select new NewMadarsaOperationsRequestModel { Id = item.Id, ShortDescription = item.ShortDescription, Location = item.Location, Area = item.Area, ExpectedStudents = item.ExpectedStudents, Girls = item.Girls, Boys = item.Boys, Teachers = item.Teachers, IsResidential = item.IsResidential, MonthlyConst = item.MonthlyConst, CostPerStudent = item.CostPerStudent, RevenueSource = item.RevenueSource, TotalLandArea = item.TotalLandArea, ConstructedArea = item.ConstructedArea, IsRented = item.IsRented, ChargingStudent = item.ChargingStudent, IfChargingHowmuch = item.IfChargingHowmuch, Doc1 = item.Doc1, Doc2 = item.Doc2, Doc3 = item.Doc3, Pic1 = item.Pic1, Pic2 = item.Pic2, Pic3 = item.Pic3, Status = item.Status, CreatedDate = item.CreatedDate, // CreatedBy = item.CreatedBy, UserId = item.UserId, UserName = (item.User != null) ? item.User.Name : string.Empty, MadarsaId = item.MadarsaId, MadarsaName = (item.Madarsa != null) ? item.Madarsa.Name : string.Empty, RequestTypeId = item.RequestTypeId, RequestTypeName = (item.RequestType != null) ? item.RequestType.Name : string.Empty, RequestSubmitId = item.RequestSubmitId, // RequestSubmitId }).OrderByDescending(x => x.Id).ToList(); return(_varList); }
public List <CourseSessionModel> CourseSessionList() { return(_CourseSession.GetAll().Select(x => new CourseSessionModel { Id = x.Id, Topic = x.Topic, CourseID = x.CourseID, Document1 = x.Document1, Document2 = x.Document2, AudioLink = x.AudioLink, VideoLink = x.VideoLink, CreatedOn = x.CreatedOn, CreatedBy = x.CreatedBy, LastSendDate = x.LastSendDate }).ToList()); }
public UserGroupModel GetUserList(Int64 userGroupID) { UserGroupModel model = new UserGroupModel(); var userList = _user.GetAll().Select(x => new UserGroupModel { UserID = x.Id, Name = x.Name, UserTypeName = x.UserType.Name, IsSelected = false }).ToList(); var userIds = userList.Select(x => x.UserID).ToList(); var userMapping = _userGroupMap.GetWithInclude(x => userIds.Contains(x.UserID.Value) && x.UserGroupID == userGroupID && x.IsActive == true).ToList(); if (userMapping.Count == 0) { model.UserList = userList; return(model); } userList.ForEach(x => { x.IsSelected = userMapping.Any(z => z.UserID == x.UserID); }); model.UserList = userList; return(model); }
public List <CustomerModel> CustomerList() { List <CustomerModel> _customerlist = new List <CustomerModel>(); var _CustomerList = _Customer.GetAll().ToList(); _customerlist = (from item in _CustomerList select new CustomerModel { ID = item.ID, CustomerName = item.CustomerName, Mobile = item.Mobile, Email = item.Email, DOB = Convert.ToDateTime(item.DOB) }).ToList(); return(_customerlist); }
public List <MasjidExtension> MasjidExtensionListf() { List <MasjidExtension> _MasjidExtensionList = new List <MasjidExtension>(); var MasjidExtensionData = _tbl_MasjidExtension.GetAll().ToList(); _MasjidExtensionList = (from item in MasjidExtensionData select new MasjidExtension { Id = item.Id, Location = item.Location, MasjidName = item.tbl_AddMasjid.MasjidName, Area = item.Area, ConstructionCost = item.ConstructionCost, ExistingFloors = item.ExistingFloors, AmountCollected = item.AmountCollected, CommitteeName = item.tbl_AddMasjidCommittee.CommitteeName, Name = item.tbl_User.Name, Head = item.Head, EngineerName = item.EngineerName, EngineerContact = item.EngineerContact, ElevationImg = item.ElevationImg, PlanImg = item.PlanImg, ConstructionImg1 = item.ConstructionImg1, ConstructionImg2 = item.ConstructionImg2, ConstructionImg3 = item.ConstructionImg3, CreatedDate = item.CreatedDate, CreatedBy = item.CreatedBy, Status = item.Status }).OrderBy(x => x.Id).ToList(); return(_MasjidExtensionList); }
public List <CategoryModel> CategoryList() { return(tbl_Category.GetAll().Select(x => new CategoryModel { Id = x.Id, Name = x.Name, }).ToList()); }
public EventRequestModel GetById(int id) { return(_EventRequest.GetAll().Where(x => x.Id == id).Select(x => new EventRequestModel { Id = x.Id, EventName = x.EventName, EventTypeId = x.EventType, Description = x.Description, TotalSpeakers = x.TotalSpeakers, FromDate = x.FromDate, ToDate = x.ToDate, Venu = x.Venu, UserId = x.UserId, RequestSubmitId = x.RequestSubmitId, CreatedDate = x.CreatedDate }).FirstOrDefault()); }
public List <EventMasterModel> GetAllEventMasterList() { return(_EventMaster.GetAll().Select(x => new EventMasterModel { Id = x.Id, Name = x.Name }).ToList()); }
public List <PanelInvolvementModel> InvolveList() { List <PanelInvolvementModel> _PanelInvolveList = new List <PanelInvolvementModel>(); var PList = _PanelInvolvement.GetAll().ToList(); _PanelInvolveList = (from item in PList select new PanelInvolvementModel { Id = item.Id, UserTypeId = Convert.ToInt32(item.UserTypeId), UserId = Convert.ToInt32(item.UserId), UserTypeName = item.UserType.Name, UserName = item.User.UserName, RequestSubmitId = Convert.ToInt32(item.RequestSubmitId) }).OrderByDescending(x => x.Id).ToList(); return(_PanelInvolveList); }
public List <RequestCommentModel> PanelCommentList(int id) { List <RequestCommentModel> requestCommentModel = new List <RequestCommentModel>(); var requestComments = _RequestComment.GetAll().Where(x => x.RequestSubmitId == id).ToList(); requestCommentModel = (from item in requestComments select new RequestCommentModel { Id = item.Id, UserId = Convert.ToInt32(item.UserId), UserName = item.User.Name, UserTypeName = item.UserType.Name, Comment = item.Comment, CreatedDate = Convert.ToDateTime(item.CreatedDate), UserTypeId = Convert.ToInt32(item.UserTypeId), }).OrderByDescending(x => x.Id).ToList(); return(requestCommentModel); }
public List <UserCategoryMappingModel> UserCategoryList() { return(_userCategoryMapping.GetAll().Select(x => new UserCategoryMappingModel { Id = x.ID, CategoryID = x.CategoryID, UserID = x.UserID, IsSelected = x.IsSelected }).ToList()); }
public CategoryModel GetById(int id) { return(_Category.GetAll().Where(x => x.Id == id).Select(x => new CategoryModel { Id = x.Id, Name = x.Name, IsDelete = Convert.ToBoolean(x.IsDelete), CreatedDate = x.CreatedDate }).FirstOrDefault()); }
public List <MadarsaExtensionRequestModel> MadarsaExtensionRequestList() { List <MadarsaExtensionRequestModel> _varList = new List <MadarsaExtensionRequestModel>(); var varData = tbl_MadarsaExtensionRequest.GetAll().ToList(); _varList = (from item in varData select new MadarsaExtensionRequestModel { Id = item.Id, ShortDescription = item.ShortDescription, Location = item.Location, Area = item.Area, ConstructionCost = item.ConstructionCost, ExistingFloors = item.ExistingFloors, AmountNeeded = item.AmountNeeded, Engineer = item.Engineer, Elevation = item.Elevation, Paln = item.Paln, Doc1 = item.Doc1, Doc2 = item.Doc2, Doc3 = item.Doc3, Pic1 = item.Pic1, Pic2 = item.Pic2, Pic3 = item.Pic3, Status = item.Status, CreatedDate = item.CreatedDate, // CreatedBy = item.CreatedBy, UserId = item.UserId, UserName = (item.User != null) ? item.User.Name : string.Empty, MadarsaId = item.MadarsaId, MadarsaName = (item.Madarsa != null) ? item.Madarsa.Name : string.Empty, RequestTypeId = item.RequestTypeId, RequestTypeName = (item.RequestType != null) ? item.RequestType.Name : string.Empty, RequestSubmitId = item.RequestSubmitId, // RequestSubmitId }).OrderByDescending(x => x.Id).ToList(); return(_varList); }
public List <RequestApproveModel> RequestApprovedList() { List <RequestApproveModel> _RequestList = new List <RequestApproveModel>(); var requestList = _RequestApprove.GetAll().ToList(); _RequestList = (from item in requestList select new RequestApproveModel { Id = item.Id, IsApproved = Convert.ToBoolean(item.IsApproved), ShortDesc = item.RequestSubmit.ShortDesc, RequestSubmitId = Convert.ToInt32(item.RequestSubmitId), UserName = item.User.Name, UserTypeName = item.UserType.Name, UserTypeId = Convert.ToInt32(item.UserTypeId), //Status=item.Status, }).Where(x => x.IsApproved == true).ToList(); return(_RequestList); }
public List <RequestSubmitModel> RequestSubmitList() { List <RequestSubmitModel> _RequestList = new List <RequestSubmitModel>(); var requestList = _RequestSubmit.GetAll().ToList(); _RequestList = (from item in requestList select new RequestSubmitModel { Id = item.Id, RequestTypeName = item.RequestType.Name, RequestTypeId = item.RequestTypeId, UserName = item.User.UserName, ShortDesc = item.ShortDesc, IsApproved = item.IsApproved, Status = item.Status, UserId = item.UserId }).OrderByDescending(x => x.Id).ToList(); return(_RequestList); }
public List <ZoneModel> ZoneList() { List <ZoneModel> _ZoneList = new List <ZoneModel>(); var ZoneData = _tbl_Zone.GetAll().ToList(); _ZoneList = (from item in ZoneData select new ZoneModel { Id = item.Id, Name = item.Name, }).OrderByDescending(x => x.Id).ToList(); return(_ZoneList); }
public List <CourseTestAnswerModel> CourseTestAnswerList() { return(_CourseTestAnswer.GetAll().Select(x => new CourseTestAnswerModel { Id = x.Id, CourseTestID = x.CourseTestID, CourseID = x.CourseID, Answer = x.Answer, UserID = x.UserID, IsCorrect = x.IsCorrect, CreatedOn = x.CreatedOn, }).ToList()); }
public List <MasjidExtensionRequestModel> MasjidExtensionRequestList() { List <MasjidExtensionRequestModel> _MERList = new List <MasjidExtensionRequestModel>(); var MERData = _tbl_MER.GetAll().ToList(); _MERList = (from item in MERData select new MasjidExtensionRequestModel { Id = item.Id, ShortDescription = item.ShortDescription, UserId = item.UserId, UserName = (item.User != null) ? item.User.Name : string.Empty, Location = item.Location, Area = item.Area, MasjidId = item.MasjidId, MasjidName = (item.Masjid != null) ? item.Masjid.Name : string.Empty, ConstructionCost = item.ConstructionCost, ExistingFloors = item.ExistingFloors, AmountNeeded = item.AmountNeeded, Engineer = item.Engineer, Elevation = item.Elevation, Paln = item.Paln, Doc1 = item.Doc1, Doc2 = item.Doc2, Doc3 = item.Doc3, Pic1 = item.Pic1, Pic2 = item.Pic2, Pic3 = item.Pic3, RequestSubmitId = item.RequestSubmitId, //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty, Status = item.Status, CreatedDate = item.CreatedDate, RequestTypeId = item.RequestTypeId, RequestTypeName = (item.RequestType != null) ? item.RequestType.Name : string.Empty, }).OrderByDescending(x => x.Id).ToList(); return(_MERList); }
public List <CustomerModel> CustomerNamesList() { List <CustomerModel> _customerList = new List <CustomerModel>(); var CustomerNames = _Customer.GetAll().ToList(); CustomerNames = CustomerNames ?? new List <Customer>(); _customerList = (from item in CustomerNames select new CustomerModel { ID = item.ID, CustomerName = item.CustomerName }).ToList(); return(_customerList); }
public List <CategoryModel> CategoryList() { List <CategoryModel> _CategoryList = new List <CategoryModel>(); var CategoryList = _Category.GetAll().ToList(); _CategoryList = (from item in CategoryList select new CategoryModel { CategoryId = item.ID, CategoryName = item.CategoryName, ParentId = Convert.ToInt32(item.ParentID) }).OrderByDescending(x => x.CategoryId).ToList(); return(_CategoryList); }
public List <MasjidLandRequestModel> MasjidLandRequestList() { List <MasjidLandRequestModel> _MLRList = new List <MasjidLandRequestModel>(); var MLRData = _tbl_MLR.GetAll().ToList(); _MLRList = (from item in MLRData select new MasjidLandRequestModel { Id = item.Id, ShortDescription = item.ShortDescription, UserId = item.UserId, UserName = (item.User != null) ? item.User.Name : string.Empty, Location = item.Location, Area = item.Area, MasjidId = item.MasjidId, MasjidName = (item.Masjid != null) ? item.Masjid.Name : string.Empty, TimePeriod = item.TimePeriod, AmountPaid = item.AmountPaid, AmountNeeded = item.AmountNeeded, LandArea = item.LandArea, LandPrice = item.LandPrice, PurchasingFrom = item.PurchasingFrom, Doc1 = item.Doc1, Doc2 = item.Doc2, Doc3 = item.Doc3, Pic1 = item.Pic1, Pic2 = item.Pic2, Pic3 = item.Pic3, RequestSubmitId = item.RequestSubmitId, //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty, Status = item.Status, CreatedDate = item.CreatedDate, RequestTypeId = item.RequestTypeId, RequestTypeName = (item.RequestType != null) ? item.RequestType.Name : string.Empty, }).OrderByDescending(x => x.Id).ToList(); return(_MLRList); }
public List <Approval> ApprovalList() { List <Approval> _ApprovalList = new List <Approval>(); var ApprovalData = _tbl_Approval.GetAll().ToList(); _ApprovalList = (from item in ApprovalData select new Approval { Id = item.Id, RequestId = item.RequestId, RequestType = item.RequestType, RequestTypeName = (item.tbl_Request != null) ? item.tbl_Request.tblRequestType : string.Empty, Comment = item.Comment, Status = item.Status }).OrderByDescending(x => x.Id).ToList(); return(_ApprovalList); }
public List <CourseTestModel> CourseTestList() { return(_CourseTest.GetAll().Select(x => new CourseTestModel { Id = x.Id, Question = x.Question, CourseID = Convert.ToInt64(x.CourseID), Answer1 = x.Answer1, Answer2 = x.Answer2, Answer3 = x.Answer3, Answer4 = x.Answer4, CorrectAnswer = x.CorrectAnswer, Mark = x.Mark, Reason = x.Reason, CreatedOn = x.CreatedOn, }).ToList()); }
public List <AddMasjidCommittee> MasjidCommitteeList() { List <AddMasjidCommittee> _AddMasjidCommitteeList = new List <AddMasjidCommittee>(); var AddMasjidCommitteeData = _tbl_AddMasjidCommittee.GetAll().ToList(); _AddMasjidCommitteeList = (from item in AddMasjidCommitteeData select new AddMasjidCommittee { Id = item.Id, CommitteeName = item.CommitteeName, MasjidId = item.MasjidId, MasjidName = (item.tbl_AddMasjid != null) ? item.tbl_AddMasjid.MasjidName : string.Empty, CreatedDate = item.CreatedDate, CreatedBy = item.CreatedBy, Status = item.Status }).OrderByDescending(x => x.Id).ToList(); return(_AddMasjidCommitteeList); }
public List <AddMasjidCommitteeMember> MasjidCommitteeMemberList() { List <AddMasjidCommitteeMember> _AddMasjidCommitteeMemberList = new List <AddMasjidCommitteeMember>(); var AddMasjidCommitteeMemberData = _tbl_AddMasjidCommitteeMember.GetAll().ToList(); _AddMasjidCommitteeMemberList = (from item in AddMasjidCommitteeMemberData select new AddMasjidCommitteeMember { Id = item.Id, CommitteeId = item.CommitteeId, CommitteeName = (item.tbl_AddMasjidCommittee != null) ? item.tbl_AddMasjidCommittee.CommitteeName : string.Empty, UserID = item.UserID, UserName = (item.tbl_User != null) ? item.tbl_User.Name : string.Empty, CreateDate = item.CreateDate, CreatedBy = item.CreatedBy, Status = item.Status }).OrderByDescending(x => x.Id).ToList(); return(_AddMasjidCommitteeMemberList); }
public List <ProductModel> ProductList() { List <ProductModel> _productList = new List <ProductModel>(); var productList = _Product.GetAll().ToList(); _productList = (from item in productList select new ProductModel { ID = item.ID, ProductName = item.ProductName, CategoryId = Convert.ToInt32(item.CategoryId), Description = item.Description, Price = Convert.ToDecimal(item.Price), Image = item.Image, ImageType = item.ImageType, CategoryName = (item.Category != null) ? item.Category.CategoryName : string.Empty, Quantity = 1 }).ToList(); return(_productList); }