예제 #1
0
 public JsonResult CreateChitDB(Repos.Models.ParamModelChitUSer chitDetails)
 {
     if (System.Web.HttpContext.Current.Session["UserObj"] != null)
     {
         CustomerModel _cmb = new CustomerModel();
         _cmb = HelpersClass.Cast <CustomerModel>(System.Web.HttpContext.Current.Session["UserObj"]);
         ChitdetailRepo           repo      = new ChitdetailRepo();
         DataTable                viewModel = repo.GetChitDetails(_cmb.CustomerId, _cmb.IsAdmin);
         IList <ChitDetailsModel> _result   = ChitEngine.Repos.DataTableExtensions.ToList <ChitDetailsModel>(viewModel);
         ViewBag.ProfileName = _cmb.FullName;
         //return View(_result);
         string  chitname   = chitDetails.cname;
         decimal chitAmount = chitDetails.camount;
         decimal chitMonth  = chitDetails.cmonth;
         decimal beetAmount = chitDetails.bamount;
         Repos.RepoLibrary.CustomerRepo objCust = new Repos.RepoLibrary.CustomerRepo();
         objCust.CreateChit(chitname, chitMonth, chitAmount, beetAmount, _cmb.CustomerId);
         return(Json(true));
     }
     else
     {
         //return RedirectToAction("Login", "Auth");
         return(Json(false));
     }
 }
예제 #2
0
 public ActionResult Details(decimal id)
 {
     if (System.Web.HttpContext.Current.Session["UserObj"] != null)
     {
         CustomerModel _cmb = new CustomerModel();
         _cmb = HelpersClass.Cast <CustomerModel>(System.Web.HttpContext.Current.Session["UserObj"]);
         ViewBag.ProfileName = _cmb.FullName;
         return(View(getChitDetails(id, _cmb.CustomerId, _cmb.IsAdmin)));
     }
     else
     {
         return(RedirectToAction("Login", "Auth"));
     }
 }
예제 #3
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            if (System.Web.HttpContext.Current.Session["UserObj"] != null)
            {
                CustomerModel _cmb = new CustomerModel();
                _cmb = HelpersClass.Cast <CustomerModel>(System.Web.HttpContext.Current.Session["UserObj"]);
                //_cmb.FirstName = "Hi";
                //_cmb.LastName = "Welcome";
                return(View(_cmb));
            }
            else
            {
                return(RedirectToAction("Login", "Auth"));
            }
        }
예제 #4
0
        //
        // GET: /Customer/

        public ActionResult Index()
        {
            if (System.Web.HttpContext.Current.Session["UserObj"] != null)
            {
                CustomerModel _cmb = new CustomerModel();
                _cmb = HelpersClass.Cast <CustomerModel>(System.Web.HttpContext.Current.Session["UserObj"]);
                ChitdetailRepo           repo      = new ChitdetailRepo();
                DataTable                viewModel = repo.GetChitDetails(_cmb.CustomerId, _cmb.IsAdmin);
                IList <ChitDetailsModel> _result   = ChitEngine.Repos.DataTableExtensions.ToList <ChitDetailsModel>(viewModel);
                ViewBag.ProfileName = _cmb.FullName;
                return(View(_result));
            }
            else
            {
                return(RedirectToAction("Login", "Auth"));
            }
        }