Exemplo n.º 1
0
        public RespuestaSP SP_GrabarIngreso(SG_INGRESOS ing, int ID_USR)
        {
            RespuestaSP result = new RespuestaSP();
            ExecuteManager(uow =>
            {
                //var manager = new SG_INGRESOSManager(uow);
                var context = (CityTruckContext)uow.Context;
                ObjectParameter p_res = new ObjectParameter("p_res", typeof(String));
                context.P_SG_GUARDAR_INGRESOS(ing.ID_INGRESO, ing.FECHA, ing.CONCEPTO, ing.ID_CAJA, ing.IMPORTE, ID_USR, ing.ID_AMORTIZACION,p_res);

                try
                {
                    int result_id = Int32.Parse(p_res.Value.ToString());
                    if (result_id > 0)
                    {
                        result.success = true;
                        result.msg = "Proceso Ejecutado Correctamente";
                        result.id = result_id;
                    }
                    else
                    {
                        result.success = false;
                        result.msg = p_res.Value.ToString();
                        result.id = -1;
                    }
                }
                catch (FormatException e)
                {
                    result.success = false;
                    result.msg = p_res.Value.ToString();
                    result.id = -1;
                }
            });
            return result;
        }
Exemplo n.º 2
0
 public JsonResult GuardarIngreso(SG_INGRESOS ing) {
     int id_usr = Convert.ToInt32(User.Identity.Name.Split('-')[3]);
     RespuestaSP respuestaSP = new RespuestaSP();
     respuestaSP = _serIng.SP_GrabarIngreso(ing,id_usr);
     return Json(respuestaSP);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Método desusado para agregar un nuevo objeto al EntitySet SG_INGRESOS. Considere la posibilidad de usar el método .Add de la propiedad ObjectSet&lt;T&gt; asociada.
 /// </summary>
 public void AddToSG_INGRESOS(SG_INGRESOS sG_INGRESOS)
 {
     base.AddObject("SG_INGRESOS", sG_INGRESOS);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Crear un nuevo objeto SG_INGRESOS.
 /// </summary>
 /// <param name="iD_INGRESO">Valor inicial de la propiedad ID_INGRESO.</param>
 /// <param name="nRO_COMP">Valor inicial de la propiedad NRO_COMP.</param>
 /// <param name="fECHA">Valor inicial de la propiedad FECHA.</param>
 /// <param name="rEGISTRAR">Valor inicial de la propiedad REGISTRAR.</param>
 /// <param name="cONCEPTO">Valor inicial de la propiedad CONCEPTO.</param>
 /// <param name="iD_CAJA">Valor inicial de la propiedad ID_CAJA.</param>
 /// <param name="iMPORTE">Valor inicial de la propiedad IMPORTE.</param>
 /// <param name="iD_USUARIO">Valor inicial de la propiedad ID_USUARIO.</param>
 public static SG_INGRESOS CreateSG_INGRESOS(global::System.Int32 iD_INGRESO, global::System.Int32 nRO_COMP, global::System.DateTime fECHA, global::System.String rEGISTRAR, global::System.String cONCEPTO, global::System.Int32 iD_CAJA, global::System.Decimal iMPORTE, global::System.Int16 iD_USUARIO)
 {
     SG_INGRESOS sG_INGRESOS = new SG_INGRESOS();
     sG_INGRESOS.ID_INGRESO = iD_INGRESO;
     sG_INGRESOS.NRO_COMP = nRO_COMP;
     sG_INGRESOS.FECHA = fECHA;
     sG_INGRESOS.REGISTRAR = rEGISTRAR;
     sG_INGRESOS.CONCEPTO = cONCEPTO;
     sG_INGRESOS.ID_CAJA = iD_CAJA;
     sG_INGRESOS.IMPORTE = iMPORTE;
     sG_INGRESOS.ID_USUARIO = iD_USUARIO;
     return sG_INGRESOS;
 }