public ActionResult getVatDetailsById(int vatid)
        {
            VatMasterRepo obj   = new VatMasterRepo();
            var           model = obj.getVatDetailsById(vatid);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        public ActionResult DeletevatMasterByID(int id)
        {
            VatMasterRepo vatbyid = new VatMasterRepo();
            var           model   = vatbyid.deleteVatDetail(id);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        public ActionResult ViewVatList()
        {
            var obj = new VatMasterRepo();
            List <VatMasterDto> model = obj.getAllVatRecords();

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
        // GET: VatMaster
        public ActionResult Index(int vatid = 0)
        {
            VatMasterRepo obj   = new VatMasterRepo();
            var           model = obj.getVatDetailsById(vatid);

            return(View(model));
        }
        public ActionResult CreateVatMaster(VatMasterDto model)
        {
            var obj       = new VatMasterRepo();
            int statusLst = 0;

            if (model.VatId > 0)
            {
                if (obj.updatevatdetail(model))
                {
                    statusLst = model.VatId;
                }
            }
            else
            {
                statusLst = obj.insertVatMaster(model);
            }
            return(Json(model, JsonRequestBehavior.AllowGet));
        }