Exemplo n.º 1
0
        public ActionResult Delete(GstMaster model)
        {
            model.Action = "Delete";
            model.UserId = UserId;

            GstMasterService.ManageGstMaster(model);
            Success("GstMaster deleted successfully.", true);
            return(RedirectToAction("Index", new { id = model.GstMasterId }));
        }
Exemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var model = new GstMaster()
            {
                Action      = "Get",
                UserId      = UserId,
                GstMasterId = id
            };

            model = GstMasterService.ManageGstMaster(model).FirstOrDefault();
            return(View(model));
        }
Exemplo n.º 3
0
 public ActionResult Edit(GstMaster model, string SelctedPermissionIds)
 {
     if (ModelState.IsValid)
     {
         model.Action = "Edit";
         model.UserId = UserId;
         GstMasterService.ManageGstMaster(model);
         Success(string.Format("GstMaster '{0}' updated successfully.", model.GstNumber), true);
         return(RedirectToAction("Details", new { id = model.GstMasterId }));
     }
     return(View(model));
 }
Exemplo n.º 4
0
 public ActionResult Create(GstMaster model)
 {
     if (ModelState.IsValid)
     {
         model.Action      = "Add";
         model.UserId      = UserId;
         model.GstMasterId = GstMasterService.ManageGstMaster(model).FirstOrDefault().GstMasterId;
         Success(string.Format("GstMaster '{0}' created successfully.", model.GstNumber), true);
         return(RedirectToAction("Details", new { id = model.GstMasterId }));
     }
     return(View());
 }
Exemplo n.º 5
0
        public ActionResult Details(int?id)
        {
            var model = new GstMaster()
            {
                Action      = "Get",
                UserId      = UserId,
                GstMasterId = Convert.ToInt32(id)
            };

            model = GstMasterService.ManageGstMaster(model).FirstOrDefault();

            return(View(model));
        }
Exemplo n.º 6
0
        public ActionResult Index(int?page, int?pageSize, int id = 0)
        {
            int pageno = 0;

            pageno = page == null ? 1 : int.Parse(page.ToString());

            var model = new GstMaster()
            {
                Action   = "Get",
                UserId   = UserId,
                PageNo   = pageno,
                PageSize = pageSize ?? 10
            };

            return(View(GetData(model)));
        }
Exemplo n.º 7
0
        Pager <GstMaster> GetData(GstMaster model)
        {
            int totalCount = 0;

            model.Action = "Get";
            model.UserId = UserId;

            var list = GstMasterService.ManageGstMaster(model);

            if (model != null && list.Count() > 0)
            {
                totalCount = list.First().TotalCount;
            }

            Pager <GstMaster> pagedList = new Pager <GstMaster>(list.ToList().AsQueryable(), model.PageNo, model.PageSize, totalCount);

            return(pagedList);
        }
Exemplo n.º 8
0
 public ActionResult Search(GstMaster model)
 {
     return(View("Index", GetData(model)));
 }
Exemplo n.º 9
0
        public ActionResult Create()
        {
            var model = new GstMaster();

            return(View(model));
        }