Ejemplo n.º 1
0
        //
        // GET: /Enquiry/
        public ActionResult Index()
        {
            SessionMasterModel objSessionModel = new SessionMasterModel();
            ClassMasterModel   objClassModel   = new ClassMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

            var SessionType = objBDCCommon.GetSessionMaster();

            objSessionModel.SessionList = new SelectList(SessionType, "SessionId", "Title");
            ViewBag.SessionInfo         = objSessionModel.SessionList;

            var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(Session[CommonStrings.DefaultSession]));

            objClassModel.ClassList = new SelectList(ClassType, "ClassId", "Title");
            ViewBag.ClassInfo       = objClassModel.ClassList;

            EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel();

            objBDC = new EnquiryDetailBusiness();
            var rs = objBDC.GetEnquiryDetailListing(objModel);

            ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();

            return(View(rs));
        }
Ejemplo n.º 2
0
        //
        // GET: /Enquiry/Edit/5
        public ActionResult Edit(int id)
        {
            if (id != 0)
            {
                ClassMasterModel    objModel         = new ClassMasterModel();
                EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel();
                objBDCCommon = new CommonMasterDataBusiness();

                var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(Session[CommonStrings.DefaultSession]));
                objModel.ClassList = new SelectList(ClassType, "ClassId", "Title");
                ViewBag.ClassInfo  = objModel.ClassList;

                var EmployeeType = objBDCCommon.GetEmployeeMaster();
                objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
                ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

                objBDC = new EnquiryDetailBusiness();
                var rs = objBDC.GetById(id);

                return(View(rs));
            }
            else
            {
                return(View());
            }
        }
        public ActionResult SearchAllocationList(int?SessionId, int?ClassId, int?SectionId, string StudentName)
        {
            EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel();

            objBDC2 = new EnquiryDetailBusiness();
            ViewBag.AllocationDetail = objBDC2.BindSessionClassEnquiry(SessionId, ClassId, SectionId, StudentName);

            return(PartialView("SearchAllocationList"));
        }
Ejemplo n.º 4
0
        public ActionResult SearchStudentList(int?SessionId, int?ClassId, int?SectionId, string StudentName)
        {
            EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel();

            objBDC2 = new EnquiryDetailBusiness();
            var rs = objBDC2.BindSessionClassEnquiry(SessionId, ClassId, SectionId, StudentName);

            return(PartialView(rs));
        }
        public ActionResult SearchAdmissionList(DateTime?FromDate, DateTime?ToDate, int?SessionId, int?ClassId, int?SectionId, string EnquiryStatus, string StudentName)
        {
            EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel();

            objEnquiry = new EnquiryDetailBusiness();
            var rs = objEnquiry.BindAdmissionReport(FromDate, ToDate, SessionId, ClassId, SectionId, EnquiryStatus, StudentName);

            ViewBag.TotalStudents = rs.ToString().Count();
            return(PartialView(rs));
        }
Ejemplo n.º 6
0
        public ActionResult Edit(int id, EnquiryDetailCustomModel objModel)
        {
            try
            {
                // TODO: Add update logic here

                if (ModelState.IsValid)
                {
                    Response response = new Response();
                    // TODO: Add update logic here
                    objBDC              = new EnquiryDetailBusiness();
                    objModel.EnquiryId  = id;
                    objModel.CreatedBy  = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    objModel.ModifiedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    response            = objBDC.SaveEnquiryDetails(objModel);

                    if (response.success == false)
                    {
                        return(new JavaScriptResult()
                        {
                            Script = "alert('Record already exists');"
                        });
                    }
                    else
                    {
                        return(RedirectToAction("Index"));
                    }
                }
                else
                {
                    ClassMasterModel    objClassModel    = new ClassMasterModel();
                    EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel();
                    objBDCCommon = new CommonMasterDataBusiness();

                    var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(Session[CommonStrings.DefaultSession]));
                    objClassModel.ClassList = new SelectList(ClassType, "ClassId", "Title");
                    ViewBag.ClassInfo       = objClassModel.ClassList;

                    var EmployeeType = objBDCCommon.GetEmployeeMaster();
                    objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
                    ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

                    objBDC = new EnquiryDetailBusiness();
                    var rs = objBDC.GetById(id);

                    return(View(rs));
                }
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 7
0
        //
        // GET: /Enquiry/Details/5
        public ActionResult Details(int id)
        {
            if (id != 0)
            {
                objBDC = new EnquiryDetailBusiness();
                var rs = objBDC.GetById(id);

                return(View(rs));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 8
0
        public ActionResult SearchSessionWiseResult(int?SessionId, int?ClassId, string StudentName)
        {
            EnquiryDetailCustomModel objModel     = new EnquiryDetailCustomModel();
            PagingViewModel          objModelPage = new PagingViewModel();

            objBDC             = new EnquiryDetailBusiness();
            objModel.SessionId = SessionId;
            objModel.ClassId   = ClassId;
            if (StudentName != "")
            {
                objModelPage.SerachTerm = StudentName;
                objModel.pageModel      = objModelPage;
            }

            var rs = objBDC.GetEnquiryDetailListing(objModel);

            @ViewBag.TotalStudents = rs.ToString().Count();
            return(PartialView(rs));
        }
Ejemplo n.º 9
0
        //
        // GET: /Enquiry/Create
        public ActionResult Create(int id = 0)
        {
            EnquiryDetailCustomModel objModel         = new EnquiryDetailCustomModel();
            ClassMasterModel         objClassModel    = new ClassMasterModel();
            SessionMasterModel       objSessionModel  = new SessionMasterModel();
            EmployeeMasterModel      objEmployeeModel = new EmployeeMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

            var SessionType = objBDCCommon.GetSessionMaster();

            objSessionModel.SessionList = new SelectList(SessionType, "SessionId", "Title");
            ViewBag.SessionInfo         = objSessionModel.SessionList;

            var EmployeeType = objBDCCommon.GetEmployeeMaster();

            objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
            ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

            if (id != 0)
            {
                objBDC   = new EnquiryDetailBusiness();
                objModel = objBDC.GetById(id);

                ViewBag.ClassValue   = Convert.ToString(objModel.ClassId);
                ViewBag.SessionValue = Convert.ToString(objModel.SessionId);

                var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(objModel.SessionId));
                objClassModel.ClassList = new SelectList(ClassType, "ClassId", "Title");
                ViewBag.ClassInfo       = objClassModel.ClassList;
            }
            else
            {
                var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(Session[CommonStrings.DefaultSession]));
                objClassModel.ClassList = new SelectList(ClassType, "ClassId", "Title");
                ViewBag.ClassInfo       = objClassModel.ClassList;

                ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();
            }

            return(View(objModel));
        }
Ejemplo n.º 10
0
        public ActionResult DeleteStatus(string id)
        {
            objBDC = new EnquiryDetailBusiness();
            int  Id      = Convert.ToInt32(id);
            bool _Result = objBDC.FindById(Id);

            if (_Result == true)
            {
                _Result = false;
            }
            else
            {
                _Result = true;
            }

            EnquiryDetailCustomModel objModel = new EnquiryDetailCustomModel();

            objModel.EnquiryId = Id;
            objBDC.DeleteEnquiryDetail(objModel);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 11
0
        // GET: FeeCollection/Create
        public ActionResult Create(int id = 0, int Aid = 0)
        {
            FeeCollectionCustomModel objFeeModel      = new FeeCollectionCustomModel();
            EnquiryDetailCustomModel objModel         = new EnquiryDetailCustomModel();
            EmployeeMasterModel      objEmployeeModel = new EmployeeMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();
            objBDCENQ    = new EnquiryDetailBusiness();

            var EmployeeType = objBDCCommon.GetEmployeeMaster();

            objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
            ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

            StudentCommonDetail objRes = new StudentCommonDetail();

            var rs        = objBDCENQ.GetEnquiryId(Aid);
            int Eid       = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId;
            int?ClassId   = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId;
            int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId;

            if (Eid != 0)
            {
                ViewBag.StudentAdmissionDate = objBDCENQ.GetById(Eid);

                objBDC = new FeeCollectionBusiness();
                ViewBag.FeeCollection = objBDC.GetStudentFeeDetail(Aid, ClassId, SectionId);
            }

            if (id != 0)
            {
                objBDC      = new FeeCollectionBusiness();
                objFeeModel = objBDC.GetById(id);
            }

            return(View(objFeeModel));
        }
Ejemplo n.º 12
0
        public ActionResult Create(FeeCollectionCustomModel objModel, int Aid = 0)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    // TODO: Add insert logic here
                    objBDC    = new FeeCollectionBusiness();
                    objBDCENQ = new EnquiryDetailBusiness();
                    StudentCommonDetail objResult = new StudentCommonDetail();

                    var rs        = objBDCENQ.GetEnquiryId(Aid);
                    int Eid       = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId;
                    int?ClassId   = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId;
                    int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId;

                    if (Eid > 0 && Aid > 0)
                    {
                        objModel.EnquiryId   = Eid;
                        objModel.AdmissionId = Aid;
                        objModel.ClassId     = ClassId;
                        objModel.SectionId   = SectionId;
                        objModel.CreatedBy   = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                        objModel.ModifiedBy  = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                        objBDC.SaveFeeCollectionMasterDetails(objModel);

                        return(RedirectToAction("Create", new { id = 0, AId = Aid }));
                    }
                    else
                    {
                        return(RedirectToAction("Index"));
                    }
                }
                else
                {
                    objBDCENQ = new EnquiryDetailBusiness();
                    EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel();
                    objBDCCommon = new CommonMasterDataBusiness();

                    var EmployeeType = objBDCCommon.GetEmployeeMaster();
                    objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
                    ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

                    var rs        = objBDCENQ.GetEnquiryId(Aid);
                    int Eid       = ((School.Shared.CustomModels.StudentCommonDetail)rs).EnquiryId;
                    int?ClassId   = ((School.Shared.CustomModels.StudentCommonDetail)rs).ClassId;
                    int?SectionId = ((School.Shared.CustomModels.StudentCommonDetail)rs).SectionId;

                    if (Eid != 0)
                    {
                        ViewBag.StudentAdmissionDate = objBDCENQ.GetById(Eid);

                        objBDC = new FeeCollectionBusiness();
                        ViewBag.FeeCollection = objBDC.GetStudentFeeDetail(Aid, ClassId, SectionId);
                    }

                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 13
0
        public ActionResult Create(EnquiryDetailCustomModel objModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Response _Result = new Response();

                    if (Request.Files[MessageDisplay.int0].ContentLength > MessageDisplay.int0)
                    {
                        var path = Path.Combine(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath + MessageDisplay.EnquiryFilePath);
                        objModel.Image = Thumbnails.UploadImage(Request.Files[MessageDisplay.int0].InputStream, path, Path.GetExtension(Request.Files[0].FileName), "e_", MessageDisplay.imageheightSize, MessageDisplay.imageweidthSize, false);
                    }

                    // TODO: Add insert logic here
                    objBDC              = new EnquiryDetailBusiness();
                    objModel.CreatedBy  = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    objModel.ModifiedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    _Result             = objBDC.SaveEnquiryDetails(objModel);

                    if (_Result.success == true)
                    {
                        TempData["Message"] = "Success^" + _Result.message;
                    }
                    else if (_Result.success == false)
                    {
                        TempData["Message"] = "Error^" + _Result.message;
                    }

                    return(RedirectToAction("Index"));
                }
                else
                {
                    ClassMasterModel    objModelClass    = new ClassMasterModel();
                    SessionMasterModel  objSessionModel  = new SessionMasterModel();
                    EmployeeMasterModel objEmployeeModel = new EmployeeMasterModel();
                    objBDCCommon = new CommonMasterDataBusiness();

                    var ClassType = objBDCCommon.GetClassMaster(Convert.ToInt32(Session[CommonStrings.DefaultSession]));
                    objModelClass.ClassList = new SelectList(ClassType, "ClassId", "Title");
                    ViewBag.ClassInfo       = objModelClass.ClassList;

                    var SessionType = objBDCCommon.GetSessionMaster();
                    objSessionModel.SessionList = new SelectList(SessionType, "SessionId", "Title");
                    ViewBag.SessionInfo         = objSessionModel.SessionList;


                    var EmployeeType = objBDCCommon.GetEmployeeMaster();
                    objEmployeeModel.EmployeeList = new SelectList(EmployeeType, "EmployeeId", "EmployeeName");
                    ViewBag.EmployeeInfo          = objEmployeeModel.EmployeeList;

                    ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();

                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }