Example #1
0
        public MadarsaLandRequestModel GetByRequestSubmitIdAmeer(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,
                // 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,
            };
            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();

            varList.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            return(varList);
        }
Example #2
0
        public MasjidLandRequestModel GetByRequestSubmitIdBoard(int id, int userid)
        {
            MasjidLandRequestModel varList = new MasjidLandRequestModel();
            var MLRbyId = _tbl_MLR.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            MLRbyId = MLRbyId ?? new MasjidLandRequest();
            varList = new MasjidLandRequestModel
            {
                Id = MLRbyId.Id,
                ShortDescription = MLRbyId.ShortDescription,
                UserId           = MLRbyId.UserId,
                UserName         = (MLRbyId.User != null) ? MLRbyId.User.UserName : string.Empty,
                Location         = MLRbyId.Location,
                Area             = MLRbyId.Area,
                MasjidId         = MLRbyId.MasjidId,
                MasjidName       = (MLRbyId.Masjid != null) ? MLRbyId.Masjid.Name : string.Empty,
                TimePeriod       = MLRbyId.TimePeriod,
                AmountPaid       = MLRbyId.AmountPaid,
                AmountNeeded     = MLRbyId.AmountNeeded,
                LandArea         = MLRbyId.LandArea,
                LandPrice        = MLRbyId.LandPrice,
                PurchasingFrom   = MLRbyId.PurchasingFrom,
                Doc1             = MLRbyId.Doc1,
                Doc2             = MLRbyId.Doc2,
                Doc3             = MLRbyId.Doc3,
                Pic1             = MLRbyId.Pic1,
                Pic2             = MLRbyId.Pic2,
                Pic3             = MLRbyId.Pic3,
                RequestSubmitId  = MLRbyId.RequestSubmitId,
                //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty,
                Status          = MLRbyId.Status,
                CreatedDate     = MLRbyId.CreatedDate,
                RequestTypeId   = MLRbyId.RequestTypeId,
                RequestTypeName = (MLRbyId.RequestType != null) ? MLRbyId.RequestType.Name : string.Empty,
            };
            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();
            varList.AlreadyExistsInMemberOpinion = varList.ApprovedList == null ? false : varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MLRbyId.RequestSubmitId).Any();
            if (varList.AlreadyExistsInMemberOpinion)
            {
                varList.MemberOpinionId = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MLRbyId.RequestSubmitId).FirstOrDefault().Id;
                varList.IsAgreed        = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MLRbyId.RequestSubmitId).FirstOrDefault().IsApproved;
                varList.LikeStatus      = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MLRbyId.RequestSubmitId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            varList.PannelMemberInvolved = panelobject.InvolveList(id).ToList();
            return(varList);
        }
Example #3
0
        public MadarsaExtensionRequestModel GetByRequestSubmitId(int id)
        {
            MadarsaExtensionRequestModel varList = new MadarsaExtensionRequestModel();
            var item = tbl_MadarsaExtensionRequest.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            item    = item ?? new MadarsaExtensionRequest();
            varList = 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
            };
            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);
        }
Example #4
0
        public MasjidConstructionRequestModel GetByRequestSubmitIdBoard(int id, int userid)
        {
            MasjidConstructionRequestModel varList = new MasjidConstructionRequestModel();
            var MCRbyId = _tbl_MCR.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            MCRbyId = MCRbyId ?? new MasjidConstructionRequest();
            varList = new MasjidConstructionRequestModel
            {
                Id = MCRbyId.Id,
                ShortDescription = MCRbyId.ShortDescription,
                UserId           = MCRbyId.UserId,
                UserName         = (MCRbyId.User != null) ? MCRbyId.User.UserName : string.Empty,
                Location         = MCRbyId.Location,
                Area             = MCRbyId.Area,
                MasjidId         = MCRbyId.MasjidId,
                MasjidName       = (MCRbyId.Masjid != null) ? MCRbyId.Masjid.Name : string.Empty,
                ConstructionCost = Convert.ToInt32(MCRbyId.ConstructionCost),
                ExistingFloors   = MCRbyId.ExistingFloors,
                AmountNeeded     = MCRbyId.AmountNeeded,
                Engineer         = MCRbyId.Engineer,
                Elevation        = MCRbyId.Elevation,
                Paln             = MCRbyId.Paln,
                Doc1             = MCRbyId.Doc1,
                Doc2             = MCRbyId.Doc2,
                Doc3             = MCRbyId.Doc3,
                Pic1             = MCRbyId.Pic1,
                Pic2             = MCRbyId.Pic2,
                Pic3             = MCRbyId.Pic3,
                RequestSubmitId  = MCRbyId.RequestSubmitId,
                //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty,
                Status          = MCRbyId.Status,
                CreatedDate     = MCRbyId.CreatedDate,
                RequestTypeId   = MCRbyId.RequestTypeId,
                RequestTypeName = (MCRbyId.RequestType != null) ? MCRbyId.RequestType.Name : string.Empty,
            };
            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();
            varList.AlreadyExistsInMemberOpinion = varList.ApprovedList == null ? false : varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MCRbyId.RequestSubmitId).Any();
            if (varList.AlreadyExistsInMemberOpinion)
            {
                varList.MemberOpinionId = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MCRbyId.RequestSubmitId).FirstOrDefault().Id;
                varList.IsAgreed        = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MCRbyId.RequestSubmitId).FirstOrDefault().IsApproved;
                varList.LikeStatus      = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == MCRbyId.RequestSubmitId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            varList.PannelMemberInvolved = panelobject.InvolveList(id).ToList();
            return(varList);
        }
        public MasjidExtensionRequestModel GetByRequestSubmitIdAmeer(int id)
        {
            MasjidExtensionRequestModel varList = new MasjidExtensionRequestModel();
            var MERbyId = _tbl_MER.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            MERbyId = MERbyId ?? new MasjidExtensionRequest();
            varList = new MasjidExtensionRequestModel
            {
                Id = MERbyId.Id,
                ShortDescription = MERbyId.ShortDescription,
                UserId           = MERbyId.UserId,
                UserName         = (MERbyId.User != null) ? MERbyId.User.UserName : string.Empty,
                Location         = MERbyId.Location,
                Area             = MERbyId.Area,
                MasjidId         = MERbyId.MasjidId,
                MasjidName       = (MERbyId.Masjid != null) ? MERbyId.Masjid.Name : string.Empty,
                ConstructionCost = MERbyId.ConstructionCost,
                ExistingFloors   = MERbyId.ExistingFloors,
                AmountNeeded     = MERbyId.AmountNeeded,
                Engineer         = MERbyId.Engineer,
                Elevation        = MERbyId.Elevation,
                Paln             = MERbyId.Paln,
                Doc1             = MERbyId.Doc1,
                Doc2             = MERbyId.Doc2,
                Doc3             = MERbyId.Doc3,
                Pic1             = MERbyId.Pic1,
                Pic2             = MERbyId.Pic2,
                Pic3             = MERbyId.Pic3,
                RequestSubmitId  = MERbyId.RequestSubmitId,
                //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty,
                Status          = MERbyId.Status,
                CreatedDate     = MERbyId.CreatedDate,
                RequestTypeId   = MERbyId.RequestTypeId,
                RequestTypeName = (MERbyId.RequestType != null) ? MERbyId.RequestType.Name : string.Empty,
            };
            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();

            varList.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            return(varList);
        }
Example #6
0
        public MasjidLandRequestModel GetMasjidLandById(int id)
        {
            MasjidLandRequestModel _MasjidLandRequestModel = new MasjidLandRequestModel();
            var MLRbyId = _tbl_MLR.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            MLRbyId = MLRbyId ?? new MasjidLandRequest();
            _MasjidLandRequestModel = new MasjidLandRequestModel
            {
                Id = MLRbyId.Id,
                ShortDescription = MLRbyId.ShortDescription,
                UserId           = MLRbyId.UserId,
                UserName         = (MLRbyId.User != null) ? MLRbyId.User.UserName : string.Empty,
                Location         = MLRbyId.Location,
                Area             = MLRbyId.Area,
                MasjidId         = MLRbyId.MasjidId,
                MasjidName       = (MLRbyId.Masjid != null) ? MLRbyId.Masjid.Name : string.Empty,
                TimePeriod       = MLRbyId.TimePeriod,
                AmountPaid       = MLRbyId.AmountPaid,
                AmountNeeded     = MLRbyId.AmountNeeded,
                LandArea         = MLRbyId.LandArea,
                LandPrice        = MLRbyId.LandPrice,
                PurchasingFrom   = MLRbyId.PurchasingFrom,
                Doc1             = MLRbyId.Doc1,
                Doc2             = MLRbyId.Doc2,
                Doc3             = MLRbyId.Doc3,
                Pic1             = MLRbyId.Pic1,
                Pic2             = MLRbyId.Pic2,
                Pic3             = MLRbyId.Pic3,
                RequestSubmitId  = MLRbyId.RequestSubmitId,
                //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty,
                Status          = MLRbyId.Status,
                CreatedDate     = MLRbyId.CreatedDate,
                RequestTypeId   = MLRbyId.RequestTypeId,
                RequestTypeName = (MLRbyId.RequestType != null) ? MLRbyId.RequestType.Name : string.Empty,
            };
            RequestCommentBs obj = new RequestCommentBs();
            var GetCommentList   = obj.BoardCommentList(id).ToList();

            _MasjidLandRequestModel.RequestCommentList = GetCommentList;
            var PannelComments = obj.PanelCommentList(id).ToList();

            _MasjidLandRequestModel.PanelCommentList = PannelComments;

            RequestApproveRejectBs obj1 = new RequestApproveRejectBs();

            _MasjidLandRequestModel.ApprovedList = obj1.ApproveRejectDisplay(id).ToList();

            PanelInvolveBs panelobject = new PanelInvolveBs();

            _MasjidLandRequestModel.PannelMemberInvolved = panelobject.InvolveList(id).ToList();

            return(_MasjidLandRequestModel);
        }
Example #7
0
        public EventRequestModel GetByRequestSubmitIdBoard(int id, int userid)
        {
            EventRequestModel varList = new EventRequestModel();
            var item = _EventRequest.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            item    = item ?? new EventRequest();
            varList = new EventRequestModel
            {
                Id              = item.Id,
                EventName       = item.EventName,
                Description     = item.Description,
                TotalSpeakers   = item.TotalSpeakers,
                Poster          = item.Poster,
                FromDate        = item.FromDate,
                ToDate          = item.ToDate,
                CreatedDate     = item.CreatedDate,
                Venu            = item.Venu,
                UserId          = item.UserId,
                UserName        = (item.User != null) ? item.User.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();
            varList.AlreadyExistsInMemberOpinion = varList.ApprovedList == null ? false : varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == item.RequestSubmitId).Any();
            if (varList.AlreadyExistsInMemberOpinion)
            {
                varList.MemberOpinionId = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == item.RequestSubmitId).FirstOrDefault().Id;
                varList.IsAgreed        = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == item.RequestSubmitId).FirstOrDefault().IsApproved;
                varList.LikeStatus      = varList.ApprovedList.Where(m => m.UserTypeId == userid && m.RequestSubmitId == item.RequestSubmitId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            varList.PannelMemberInvolved = panelobject.InvolveList(id).ToList();
            return(varList);
        }
Example #8
0
        public MasjidLandRequestModel GetByRequestId(int id, int UserTypeId, int userId)
        {
            MasjidLandRequestModel _MasjidLandRequestModel = new MasjidLandRequestModel();
            var MLRbyId = _tbl_MLR.GetAll().Where(m => m.RequestSubmitId == id).FirstOrDefault();

            MLRbyId = MLRbyId ?? new MasjidLandRequest();
            _MasjidLandRequestModel = new MasjidLandRequestModel
            {
                Id = MLRbyId.Id,
                ShortDescription = MLRbyId.ShortDescription,
                UserId           = MLRbyId.UserId,
                UserName         = (MLRbyId.User != null) ? MLRbyId.User.UserName : string.Empty,
                Location         = MLRbyId.Location,
                LandArea         = MLRbyId.LandArea,
                LandPrice        = MLRbyId.LandPrice,
                MasjidId         = MLRbyId.MasjidId,
                MasjidName       = (MLRbyId.Masjid != null) ? MLRbyId.Masjid.Name : string.Empty,
                TimePeriod       = MLRbyId.TimePeriod,
                AmountPaid       = MLRbyId.AmountPaid,
                AmountNeeded     = MLRbyId.AmountNeeded,
                PurchasingFrom   = MLRbyId.PurchasingFrom,
                Doc1             = MLRbyId.Doc1,
                Doc2             = MLRbyId.Doc2,
                Doc3             = MLRbyId.Doc3,
                Pic1             = MLRbyId.Pic1,
                Pic2             = MLRbyId.Pic2,
                Pic3             = MLRbyId.Pic3,
                RequestSubmitId  = MLRbyId.RequestSubmitId,
                //RequestSubmitName= (item.RequestSubmit != null) ? item.RequestSubmit.Name : string.Empty,
                Status          = MLRbyId.Status,
                CreatedDate     = MLRbyId.CreatedDate,
                RequestTypeId   = MLRbyId.RequestTypeId,
                RequestTypeName = (MLRbyId.RequestType != null) ? MLRbyId.RequestType.Name : string.Empty,
            };
            RequestCommentBs obj = new RequestCommentBs();
            var BoardComments    = obj.BoardCommentList(id).ToList();

            _MasjidLandRequestModel.BoardCommentList = BoardComments;



            var PannelComments = obj.PanelCommentList(id).ToList();

            _MasjidLandRequestModel.PanelCommentList = PannelComments;
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                _MasjidLandRequestModel.PanelCommentList = _MasjidLandRequestModel.PanelCommentList.Where(x => x.UserTypeId == 6 || x.UserTypeId == 15).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                _MasjidLandRequestModel.PanelCommentList = _MasjidLandRequestModel.PanelCommentList.Where(x => x.UserTypeId == 7 || x.UserTypeId == 13).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                _MasjidLandRequestModel.PanelCommentList = _MasjidLandRequestModel.PanelCommentList.Where(x => x.UserTypeId == 8 || x.UserTypeId == 11).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                _MasjidLandRequestModel.PanelCommentList = _MasjidLandRequestModel.PanelCommentList.Where(x => x.UserTypeId == 12 || x.UserTypeId == 14).ToList();
            }

            RequestApproveRejectBs obj1 = new RequestApproveRejectBs();

            _MasjidLandRequestModel.ApprovedList = obj1.ApproveRejectDisplay(id).ToList();
            _MasjidLandRequestModel.AlreadyExistsInMemberOpinion = _MasjidLandRequestModel.ApprovedList == null ? false : _MasjidLandRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MLRbyId.RequestSubmitId && m.UserId == userId).Any();
            if (_MasjidLandRequestModel.AlreadyExistsInMemberOpinion)
            {
                _MasjidLandRequestModel.MemberOpinionId = _MasjidLandRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MLRbyId.RequestSubmitId).FirstOrDefault().Id;
                _MasjidLandRequestModel.IsAgreed        = _MasjidLandRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MLRbyId.RequestSubmitId && m.UserId == userId).FirstOrDefault().IsApproved;
                _MasjidLandRequestModel.LikeStatus      = _MasjidLandRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MLRbyId.RequestSubmitId && m.UserId == userId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            _MasjidLandRequestModel.PannelMemberInvolved     = panelobject.InvolveList(id).ToList();
            _MasjidLandRequestModel.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                _MasjidLandRequestModel.PaannelMemberLikeDisLike = _MasjidLandRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 6 || x.UserTypeId == 15 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                _MasjidLandRequestModel.PaannelMemberLikeDisLike = _MasjidLandRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 7 || x.UserTypeId == 13 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                _MasjidLandRequestModel.PaannelMemberLikeDisLike = _MasjidLandRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 8 || x.UserTypeId == 11 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                _MasjidLandRequestModel.PaannelMemberLikeDisLike = _MasjidLandRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 12 || x.UserTypeId == 14 && x.LikeStatus != null)).ToList();
            }
            return(_MasjidLandRequestModel);
        }
        public ExistingMadarsaOperationsRequestModel GetByRequestSubmitId(int id)
        {
            ExistingMadarsaOperationsRequestModel varList = new ExistingMadarsaOperationsRequestModel();
            var item = tbl_ExistingMadarsaOperationsRequestModel.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            item    = item ?? new ExistingMadarsaOperationsRequest();
            varList = new ExistingMadarsaOperationsRequestModel
            {
                Id = item.Id,
                ShortDescription  = item.ShortDescription,
                Location          = item.Location,
                Area              = item.Area,
                ExpectedStudents  = item.ExpectedStudents,
                Girls             = item.Girls,
                Boys              = item.Boys,
                Teachers          = item.Teachers,
                IfChargingHowmuch = item.IfChargingHowmuch,
                IsResidential     = item.IsResidential,
                MonthlyConst      = item.MonthlyConst,
                CostPerStudent    = item.CostPerStudent,
                RevenueSource     = item.RevenueSource,
                TotalLandArea     = item.TotalLandArea,
                ConstructedArea   = item.ConstructedArea,
                IsRented          = item.IsRented,
                ChargingStudent   = item.ChargingStudent,
                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 ExistingMadarsaOperationsRequestModel GetByRequestSubmitId(int id, int UserTypeId, int UserId)
        {
            ExistingMadarsaOperationsRequestModel varList = new ExistingMadarsaOperationsRequestModel();
            var item = tbl_ExistingMadarsaOperationsRequestModel.GetAll().Where(x => x.RequestSubmitId == id).FirstOrDefault();

            item    = item ?? new ExistingMadarsaOperationsRequest();
            varList = new ExistingMadarsaOperationsRequestModel
            {
                Id = item.Id,
                ShortDescription  = item.ShortDescription,
                Location          = item.Location,
                Area              = item.Area,
                ExpectedStudents  = item.ExpectedStudents,
                Girls             = item.Girls,
                Boys              = item.Boys,
                Teachers          = item.Teachers,
                IfChargingHowmuch = item.IfChargingHowmuch,
                IsResidential     = item.IsResidential,
                MonthlyConst      = item.MonthlyConst,
                CostPerStudent    = item.CostPerStudent,
                RevenueSource     = item.RevenueSource,
                TotalLandArea     = item.TotalLandArea,
                ConstructedArea   = item.ConstructedArea,
                IsRented          = item.IsRented,
                ChargingStudent   = item.ChargingStudent,
                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;
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 6 || x.UserTypeId == 15).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 7 || x.UserTypeId == 13).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 8 || x.UserTypeId == 11).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 12 || x.UserTypeId == 14).ToList();
            }

            RequestApproveRejectBs obj1 = new RequestApproveRejectBs();

            varList.ApprovedList = obj1.ApproveRejectDisplay(id).ToList();
            varList.AlreadyExistsInMemberOpinion = varList.ApprovedList == null ? false : varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).Any();
            if (varList.AlreadyExistsInMemberOpinion)
            {
                varList.MemberOpinionId = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId).FirstOrDefault().Id;
                varList.IsAgreed        = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).FirstOrDefault().IsApproved;
                varList.LikeStatus      = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            varList.PannelMemberInvolved     = panelobject.InvolveList(id).ToList();
            varList.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 6 || x.UserTypeId == 15 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 7 || x.UserTypeId == 13 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 8 || x.UserTypeId == 11 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 12 || x.UserTypeId == 14 && x.LikeStatus != null)).ToList();
            }
            return(varList);
        }
Example #11
0
        public MadarsaLandRequestModel GetByRequestSubmitId(int id, int UserTypeId, int UserId)
        {
            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,
                // 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,
            };
            RequestCommentBs obj = new RequestCommentBs();
            var BoardComments    = obj.BoardCommentList(id).ToList();

            varList.BoardCommentList = BoardComments;



            var PannelComments = obj.PanelCommentList(id).ToList();

            varList.PanelCommentList = PannelComments;
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 6 || x.UserTypeId == 15).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 7 || x.UserTypeId == 13).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 8 || x.UserTypeId == 11).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                varList.PanelCommentList = varList.PanelCommentList.Where(x => x.UserTypeId == 12 || x.UserTypeId == 14).ToList();
            }

            RequestApproveRejectBs obj1 = new RequestApproveRejectBs();

            varList.ApprovedList = obj1.ApproveRejectDisplay(id).ToList();
            varList.AlreadyExistsInMemberOpinion = varList.ApprovedList == null ? false : varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).Any();
            if (varList.AlreadyExistsInMemberOpinion)
            {
                varList.MemberOpinionId = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId).FirstOrDefault().Id;
                varList.IsAgreed        = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).FirstOrDefault().IsApproved;
                varList.LikeStatus      = varList.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == item.RequestSubmitId && m.UserId == UserId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            varList.PannelMemberInvolved     = panelobject.InvolveList(id).ToList();
            varList.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 6 || x.UserTypeId == 15 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 7 || x.UserTypeId == 13 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 8 || x.UserTypeId == 11 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                varList.PaannelMemberLikeDisLike = varList.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 12 || x.UserTypeId == 14 && x.LikeStatus != null)).ToList();
            }
            return(varList);
        }
Example #12
0
        public MasjidRenovationRequestModel GetByRequestId(int id, int UserTypeId, int userId)
        {
            MasjidRenovationRequestModel _MasjidRenovationRequestModel = new MasjidRenovationRequestModel();
            var MRRbyId = _tbl_MRR.GetAll().Where(m => m.RequestSubmitId == id).FirstOrDefault();

            MRRbyId = MRRbyId ?? new MasjidRenovationRequest();
            _MasjidRenovationRequestModel = new MasjidRenovationRequestModel
            {
                Id = MRRbyId.Id,
                ShortDescription = MRRbyId.ShortDescription,
                UserId           = MRRbyId.UserId,
                UserName         = (MRRbyId.User != null) ? MRRbyId.User.UserName : string.Empty,
                Location         = MRRbyId.Location,
                Area             = MRRbyId.Area,
                MasjidId         = MRRbyId.MasjidId,
                MasjidName       = (MRRbyId.Masjid != null) ? MRRbyId.Masjid.Name : string.Empty,
                ConstructionCost = MRRbyId.ConstructionCost,
                ExistingFloors   = MRRbyId.ExistingFloors,
                AmountNeeded     = MRRbyId.AmountNeeded,
                Engineer         = MRRbyId.Engineer,
                Elevation        = MRRbyId.Elevation,
                Paln             = MRRbyId.Paln,
                Doc1             = MRRbyId.Doc1,
                Doc2             = MRRbyId.Doc2,
                Doc3             = MRRbyId.Doc3,
                Pic1             = MRRbyId.Pic1,
                Pic2             = MRRbyId.Pic2,
                Pic3             = MRRbyId.Pic3,
                RequestSubmitId  = MRRbyId.RequestSubmitId,

                Status          = MRRbyId.Status,
                CreatedDate     = MRRbyId.CreatedDate,
                RequestTypeId   = MRRbyId.RequestTypeId,
                RequestTypeName = (MRRbyId.RequestType != null) ? MRRbyId.RequestType.Name : string.Empty,
            };
            RequestCommentBs obj = new RequestCommentBs();
            var BoardComments    = obj.BoardCommentList(id).ToList();

            _MasjidRenovationRequestModel.BoardCommentList = BoardComments;



            var PannelComments = obj.PanelCommentList(id).ToList();

            _MasjidRenovationRequestModel.PanelCommentList = PannelComments;
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                _MasjidRenovationRequestModel.PanelCommentList = _MasjidRenovationRequestModel.PanelCommentList.Where(x => x.UserTypeId == 6 || x.UserTypeId == 15).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                _MasjidRenovationRequestModel.PanelCommentList = _MasjidRenovationRequestModel.PanelCommentList.Where(x => x.UserTypeId == 7 || x.UserTypeId == 13).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                _MasjidRenovationRequestModel.PanelCommentList = _MasjidRenovationRequestModel.PanelCommentList.Where(x => x.UserTypeId == 8 || x.UserTypeId == 11).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                _MasjidRenovationRequestModel.PanelCommentList = _MasjidRenovationRequestModel.PanelCommentList.Where(x => x.UserTypeId == 12 || x.UserTypeId == 14).ToList();
            }

            RequestApproveRejectBs obj1 = new RequestApproveRejectBs();

            _MasjidRenovationRequestModel.ApprovedList = obj1.ApproveRejectDisplay(id).ToList();
            _MasjidRenovationRequestModel.AlreadyExistsInMemberOpinion = _MasjidRenovationRequestModel.ApprovedList == null ? false : _MasjidRenovationRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MRRbyId.RequestSubmitId && m.UserId == userId).Any();
            if (_MasjidRenovationRequestModel.AlreadyExistsInMemberOpinion)
            {
                _MasjidRenovationRequestModel.MemberOpinionId = _MasjidRenovationRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MRRbyId.RequestSubmitId).FirstOrDefault().Id;
                _MasjidRenovationRequestModel.IsAgreed        = _MasjidRenovationRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MRRbyId.RequestSubmitId && m.UserId == userId).FirstOrDefault().IsApproved;
                _MasjidRenovationRequestModel.LikeStatus      = _MasjidRenovationRequestModel.ApprovedList.Where(m => m.UserTypeId == UserTypeId && m.RequestSubmitId == MRRbyId.RequestSubmitId && m.UserId == userId).FirstOrDefault().LikeStatus;
            }
            PanelInvolveBs panelobject = new PanelInvolveBs();

            _MasjidRenovationRequestModel.PannelMemberInvolved     = panelobject.InvolveList(id).ToList();
            _MasjidRenovationRequestModel.PaannelMemberLikeDisLike = obj1.ApproveRejectDisplay(id).ToList();
            if (UserTypeId == 6 || UserTypeId == 15)
            {
                _MasjidRenovationRequestModel.PaannelMemberLikeDisLike = _MasjidRenovationRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 6 || x.UserTypeId == 15 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 7 || UserTypeId == 13)
            {
                _MasjidRenovationRequestModel.PaannelMemberLikeDisLike = _MasjidRenovationRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 7 || x.UserTypeId == 13 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 8 || UserTypeId == 11)
            {
                _MasjidRenovationRequestModel.PaannelMemberLikeDisLike = _MasjidRenovationRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 8 || x.UserTypeId == 11 && x.LikeStatus != null)).ToList();
            }
            else if (UserTypeId == 12 || UserTypeId == 14)
            {
                _MasjidRenovationRequestModel.PaannelMemberLikeDisLike = _MasjidRenovationRequestModel.PaannelMemberLikeDisLike.Where((x => x.UserTypeId == 12 || x.UserTypeId == 14 && x.LikeStatus != null)).ToList();
            }
            return(_MasjidRenovationRequestModel);
        }