public ActionResult Edit(int id, FeeMasterCustomModel objModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Response response = new Response();
                    // TODO: Add update logic here
                    objBDC = new FeeMasterBusiness();
                    objModel.FeeMasterId = id;
                    response             = objBDC.SaveFeeMasterDetails(objModel);

                    if (response.success == false)
                    {
                        return(new JavaScriptResult()
                        {
                            Script = "alert('Record already exists');"
                        });
                    }
                    else
                    {
                        return(RedirectToAction("Index"));
                    }
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(FeeMasterCustomModel objModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Response _Result = new Response();
                    // TODO: Add insert logic here
                    objBDC              = new FeeMasterBusiness();
                    objModel.CreatedBy  = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    objModel.ModifiedBy = ((School.Shared.CustomModels.UserLoginCustomModel)(Session[CommonStrings.UserSession])).Id;
                    _Result             = objBDC.SaveFeeMasterDetails(objModel);

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

                    return(RedirectToAction("Index"));
                }
                else
                {
                    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;

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