コード例 #1
0
        // GET: Dashboard
        public ActionResult Index()
        {
            if (Session[CommonStrings.DefaultSession] != null)
            {
                ViewBag.DefaultSessionId = Session[CommonStrings.DefaultSession];
            }

            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;

            int?SessionId = null;
            int?ClassId   = null;

            objBDC = new DashboardMasterBusiness();
            ViewBag.EnquiryCount = objBDC.GetDashboardEnquiryCount(SessionId, ClassId);

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

            return(View());
        }
コード例 #2
0
        //
        // GET: /SectionAllocation/Create
        public ActionResult Create()
        {
            ClassMasterModel   objModel        = new ClassMasterModel();
            SectionMasterModel objSectionModel = new SectionMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

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

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

            var SectionType = objBDCCommon.GetSectionMaster(0);

            objSectionModel.SectionList = new SelectList(SectionType, "SectionId", "Title");
            ViewBag.SectionInfo         = objSectionModel.SectionList;

            SessionMasterModel objSessionModel = new SessionMasterModel();
            var SessionType = objBDCCommon.GetSessionMaster();

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

            return(View());
        }
コード例 #3
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());
            }
        }
コード例 #4
0
        public ActionResult FillCity(int SessionId)
        {
            objBDCCommon = new CommonMasterDataBusiness();
            var classes = objBDCCommon.BindSessionClass(SessionId);

            return(Json(classes, JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public ActionResult FillSection(int ClassId)
        {
            objBDCCommon = new CommonMasterDataBusiness();
            var sections = objBDCCommon.BindClassSection(ClassId);

            return(Json(sections, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        //
        // GET: /Class/Create
        public ActionResult Create(int id = 0)
        {
            ClassMasterCustomModel objModel = new ClassMasterCustomModel();

            objBDCCommon = new CommonMasterDataBusiness();

            SessionMasterModel objSessionModel = new SessionMasterModel();
            var SessionType = objBDCCommon.GetSessionMaster();

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

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

                ViewBag.SessionValue = Convert.ToString(objModel.SessionId);
            }
            else
            {
                ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();
            }

            return(View(objModel));
        }
コード例 #7
0
        //
        // GET: /AdmissionFeeMaster/Create
        public ActionResult Create(int id = 0)
        {
            AdmissionFeeMasterCustomModel objModel = new AdmissionFeeMasterCustomModel();
            ClassMasterModel objClassModel         = new ClassMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

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

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

            SessionMasterModel objSessionModel = new SessionMasterModel();
            var SessionType = objBDCCommon.GetSessionMaster();

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

            if (id > 0)
            {
                objBDC   = new AdmissionFeeMasterBusiness();
                objModel = objBDC.GetById(id);
            }

            return(View(objModel));
        }
コード例 #8
0
        //
        // GET: /Section/
        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;

            SectionMasterCustomModel objModel = new SectionMasterCustomModel();

            objBDC             = new SectionMasterBusiness();
            objModel.SessionId = Convert.ToInt32(Session[CommonStrings.DefaultSession]);
            var rs = objBDC.GetSectionMasterListing(objModel);

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

            return(View(rs));
        }
コード例 #9
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());
            }
        }
コード例 #10
0
        //
        // GET: /BusChargesMaster/Edit/5
        public ActionResult Edit(int id)
        {
            objBDCCommon = new CommonMasterDataBusiness();

            SessionMasterModel objModel = new SessionMasterModel();
            var SessionType             = objBDCCommon.GetSessionMaster();

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

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

            return(View(rs));
        }
コード例 #11
0
        public ActionResult Create(SectionMasterCustomModel objModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Response _Result = new Response();
                    // TODO: Add insert logic here
                    objBDC              = new SectionMasterBusiness();
                    objModel.CreatedBy  = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    objModel.ModifiedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    _Result             = objBDC.SaveSectionMasterDetails(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   objClassModel   = new ClassMasterModel();
                    SessionMasterModel objSessionModel = new SessionMasterModel();
                    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;

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

                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
コード例 #12
0
        //
        // GET: /AdmissionFeeMaster/
        public ActionResult Index()
        {
            SessionMasterModel objSessionModel = new SessionMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

            var SessionType = objBDCCommon.GetSessionMaster();

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

            AdmissionFeeMasterCustomModel objModel = new AdmissionFeeMasterCustomModel();

            objBDC = new AdmissionFeeMasterBusiness();
            var rs = objBDC.GetAdmissionFeeMasterListing(objModel);

            return(View(rs));
        }
コード例 #13
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));
        }
コード例 #14
0
        //
        // GET: /BusChargesMaster/Create
        public ActionResult Create(int id = 0)
        {
            BusChargesMasterCustomModel objModel = new BusChargesMasterCustomModel();

            objBDCCommon = new CommonMasterDataBusiness();

            SessionMasterModel objSessionModel = new SessionMasterModel();
            var SessionType = objBDCCommon.GetSessionMaster();

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

            if (id > 0)
            {
                objBDC   = new BusChargesMasterBusiness();
                objModel = objBDC.GetById(id);
            }

            return(View(objModel));
        }
コード例 #15
0
        // GET: Profile
        public ActionResult Index()
        {
            ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();

            SessionMasterModel objSessionModel = new SessionMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

            var SessionType = objBDCCommon.GetSessionMaster();

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

            ProfileCustomModel objModel = new ProfileCustomModel();

            objBDC             = new ProfileBusiness();
            objModel.SessionId = Convert.ToInt32(Session[CommonStrings.DefaultSession]);
            var rs = objBDC.GetById(objModel.SessionId);

            return(View(rs));
        }
コード例 #16
0
        //
        // GET: /AdmissionFeeMaster/Edit/5
        public ActionResult Edit(int id)
        {
            ClassMasterModel objModel = new ClassMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

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

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

            SessionMasterModel objModel2 = new SessionMasterModel();
            var SessionType = objBDCCommon.GetSessionMaster();

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

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

            return(View(rs));
        }
コード例 #17
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));
        }
コード例 #18
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());
            }
        }
コード例 #19
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());
            }
        }