Beispiel #1
0
        public ActionResult add_id_proof(PaymentTypeVM vmObj)
        {
            vmObj.CreatedBy   = 1;
            vmObj.CreatedDate = DateTime.Now;
            vmObj.UpdatedBy   = 1;
            vmObj.UpdatedDate = DateTime.Now;


            int isSaved = 0;

            if (ModelState.IsValid)
            {
                var result = Mapper.Map <PaymentType>(vmObj);

                result.IsActive = true;

                isSaved = _Manager.Add(result);
                if (isSaved > 0)
                {
                    status  = true;
                    message = "Succesfully Saved";
                }
                else
                {
                    status  = true;
                    message = "Error! Please try again.";
                }

                return(new JsonResult {
                    Data = new { status = status, message = message }
                });
            }

            else
            {
                status  = false;
                message = "PaymentType Allready Exsists !!!";
                return(new JsonResult {
                    Data = new { status = status, message = message }
                });
            }
        }
Beispiel #2
0
        public ActionResult Create(Bank bank, string userid)
        {
            if (ModelState.IsValid)
            {
                if (bank.ISACTIVE)
                {
                    bank.ISACTIVEDATE = DateTime.Now;
                }

                bank.COMPANYSITE = int.Parse(Session["companysite"].ToString());
                BK.Add(bank, Session["userid"].ToString());
                TempData["successmessage"] = "Saved successfully";
                return(RedirectToAction("Create"));
            }
            else
            {
                bank.GetSelectListCurrencyMaster = GetSelectListCurrencyMaster();
                bank.GetSelectListCountry        = GetSelectListCountry();
                bank.GetSelectListProvince       = GetSelectListProvince();
                bank.GetSelectListCity           = GetSelectListCity();
                return(View(bank));
            }
        }
Beispiel #3
0
 public Response AddBank([FromBody] Bank value)
 {
     return(repo.Add(value));
 }