Ejemplo n.º 1
0
        public ActionResult Index()
        {
            UnApprovedVoucherModel model = new UnApprovedVoucherModel();

            model.UnApprovedVoucherList = ser.GetUnapprovedvoucherList();


            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Cancel(long id)
        {
            UnApprovedVoucherModel model = new UnApprovedVoucherModel();

            var ts = (TravelSession)Session["TravelPortalSessionInfo"];

            ser.Cancel(id, ts.AppUserId);
            model.UnApprovedVoucherList = ser.GetUnapprovedvoucherList();

            return(View("Index", model));
        }
Ejemplo n.º 3
0
        public ActionResult Approve(long id)
        {
            UnApprovedVoucherModel model = new UnApprovedVoucherModel();
            var ts = (TravelSession)Session["TravelPortalSessionInfo"];

            ser.Approve(id, ts.AppUserId);

            model.UnApprovedVoucherList = ser.GetUnapprovedvoucherList();

            //  return View("Index", model);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        public List <UnApprovedVoucherModel> GetUnapprovedvoucherList()
        {
            var data = ent.GL_GetUnApprovedVoucher();

            List <UnApprovedVoucherModel> model = new List <UnApprovedVoucherModel>();

            foreach (var item in data)
            {
                var UnApprovedVoucherModel = new UnApprovedVoucherModel
                {
                    VoucherNo    = item.VoucherNo,
                    TranDate     = item.TranDate,
                    ProductName  = item.ProductName,
                    LedgerName   = item.LedgerName,
                    Narration1   = item.Narration1,
                    CreditAmount = item.CreditAmount,
                    DebitAmount  = item.DebitAmount
                };
                model.Add(UnApprovedVoucherModel);
            }
            return(model);
        }