Ejemplo n.º 1
0
        public void UpdateRow(ro_empleado_proyeccion_gastos_det_Info info_det, decimal IdTransaccionSession)
        {
            ro_empleado_proyeccion_gastos_det_Info edited_info = get_list(IdTransaccionSession).Where(m => m.Secuencia == info_det.Secuencia).First();

            edited_info.Valor       = info_det.Valor;
            edited_info.IdTipoGasto = info_det.IdTipoGasto;
        }
Ejemplo n.º 2
0
        public void AddRow(ro_empleado_proyeccion_gastos_det_Info info_det, decimal IdTransaccionSession)
        {
            List <ro_empleado_proyeccion_gastos_det_Info> list = get_list(IdTransaccionSession);

            info_det.Secuencia = list.Count == 0 ? 1 : list.Max(q => q.Secuencia) + 1;
            list.Add(info_det);
        }
Ejemplo n.º 3
0
        public ActionResult EditingDelete([ModelBinder(typeof(DevExpressEditorsBinder))] ro_empleado_proyeccion_gastos_det_Info info_det)
        {
            ro_empleado_proyeccion_gastos_det_Info_lis.DeleteRow(info_det.Secuencia, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            ro_empleado_proyeccion_gastos_Info model = new ro_empleado_proyeccion_gastos_Info();

            model.list_proyeciones = ro_empleado_proyeccion_gastos_det_Info_lis.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            cargar_combo();
            return(PartialView("_GridViewPartial_proyeccion_gastos_det", model));
        }
Ejemplo n.º 4
0
        public ActionResult EditingAddNew([ModelBinder(typeof(DevExpressEditorsBinder))] ro_empleado_proyeccion_gastos_det_Info info_det)
        {
            ro_empleado_proyeccion_gastos_Info model = new ro_empleado_proyeccion_gastos_Info();

            if (ModelState.IsValid)
            {
                var lista_tmp = ro_empleado_proyeccion_gastos_det_Info_lis.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
                if (lista_tmp.Where(v => v.IdTipoGasto == info_det.IdTipoGasto).Count() == 0)
                {
                    ro_empleado_proyeccion_gastos_det_Info_lis.AddRow(info_det, Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
                }
                model.list_proyeciones = ro_empleado_proyeccion_gastos_det_Info_lis.get_list(Convert.ToDecimal(SessionFixed.IdTransaccionSessionActual));
            }
            cargar_combo();
            return(PartialView("_GridViewPartial_proyeccion_gastos_det", model));
        }