Example #1
0
 /// <summary>
 /// Crear un nuevo objeto SG_EGRESOS.
 /// </summary>
 /// <param name="iD_EGRESO">Valor inicial de la propiedad ID_EGRESO.</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_EGRESOS CreateSG_EGRESOS(global::System.Int32 iD_EGRESO, 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_EGRESOS sG_EGRESOS = new SG_EGRESOS();
     sG_EGRESOS.ID_EGRESO = iD_EGRESO;
     sG_EGRESOS.NRO_COMP = nRO_COMP;
     sG_EGRESOS.FECHA = fECHA;
     sG_EGRESOS.REGISTRAR = rEGISTRAR;
     sG_EGRESOS.CONCEPTO = cONCEPTO;
     sG_EGRESOS.ID_CAJA = iD_CAJA;
     sG_EGRESOS.IMPORTE = iMPORTE;
     sG_EGRESOS.ID_USUARIO = iD_USUARIO;
     return sG_EGRESOS;
 }
Example #2
0
        public RespuestaSP SP_GrabarEgreso(SG_EGRESOS egr, int ID_USR)
        {
            RespuestaSP result = new RespuestaSP();
            ExecuteManager(uow =>
            {
                var context = (CityTruckContext)uow.Context;
                ObjectParameter p_res = new ObjectParameter("p_res", typeof(String));
                context.P_SG_GUARDAR_EGRESOS(egr.ID_EGRESO, egr.FECHA, egr.CONCEPTO, egr.ID_CAJA, egr.IMPORTE, ID_USR, 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;
        }
Example #3
0
 /// <summary>
 /// Método desusado para agregar un nuevo objeto al EntitySet SG_EGRESOS. Considere la posibilidad de usar el método .Add de la propiedad ObjectSet&lt;T&gt; asociada.
 /// </summary>
 public void AddToSG_EGRESOS(SG_EGRESOS sG_EGRESOS)
 {
     base.AddObject("SG_EGRESOS", sG_EGRESOS);
 }
Example #4
0
 public JsonResult GuardarEgreso(SG_EGRESOS egr) {
     int id_usr = Convert.ToInt32(User.Identity.Name.Split('-')[3]);
     RespuestaSP respuestaSP = new RespuestaSP();
     respuestaSP = _serIng.SP_GrabarEgreso(egr,id_usr);
     return Json(respuestaSP);
 }