Пример #1
0
 public FrmPagarPaquete(AbonoPaquete item, PaqueteViewModel model)
 {
     InitializeComponent();
     Model = model;
     IniciarBinding();
     paquete = new AbonoPaquete();
     paquete = item;
 }
Пример #2
0
        public async Task <int> GuardarAbono(Guid idCuentaUsuario)
        {
            AbonoPaquete model = new AbonoPaquete
            {
                TablaFormaPago = TablaFormaPago,
                TablaPaquete   = ModelPaquete.TablaAbonoPaquete,
                IdTurno        = this.IdTurno
            };

            return(await PaqueteRepository.AddAbonoAsync(model, idCuentaUsuario));
        }
Пример #3
0
        public async Task <int> AddAbonoAsync(AbonoPaquete element, object IdUsuario)
        {
            try
            {
                using (IDbConnection conexion = new SqlConnection(WebConnectionString))
                {
                    conexion.Open();
                    var dynamicParameters = new DynamicParameters();
                    dynamicParameters.Add("@TablaPaquete", element.TablaPaquete, DbType.Object);
                    dynamicParameters.Add("@TablaFormaPago", element.TablaFormaPago, DbType.Object);
                    dynamicParameters.Add("@IdUsuario", IdUsuario);
                    dynamicParameters.Add("@IdTurno", element.IdTurno);
                    var result = await conexion.ExecuteScalarAsync <int>("[Paquete].[SPCID_A_AbonoPaquete]", param : dynamicParameters, commandType : CommandType.StoredProcedure);

                    return(result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }