public ActionResult FormasPagoLinAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] FormasPagoLinModel item)
        {
            var model = Session[session] as List <FormasPagoLinModel>;

            try
            {
                if (ModelState.IsValid)
                {
                    var max = model.Any() ? model.Max(f => f.Id) : 0;
                    item.Id = max + 1;
                    model.Add(item);

                    Session[session] = model;
                }
            }
            catch (ValidationException)
            {
                model.Remove(item);
                throw;
            }



            return(PartialView("FormasPagoLin", model));
        }
        public ActionResult FormasPagoLinUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] FormasPagoLinModel item)
        {
            var model = Session[session] as List <FormasPagoLinModel>;

            try
            {
                if (ModelState.IsValid)
                {
                    var editItem = model.Single(f => f.Id == item.Id);
                    editItem.DiasVencimiento = item.DiasVencimiento;
                    editItem.PorcentajePago  = item.PorcentajePago;

                    Session[session] = model;
                }
            }
            catch (ValidationException)
            {
                throw;
            }

            return(PartialView("FormasPagoLin", model));
        }