Example #1
0
 public async Task <int> Registrar()
 {
     try
     {
         RegistroEntradaSalida model = new RegistroEntradaSalida();
         model.IdEmpleado = this.IdEmpleado;
         model.Tipo       = this.Tipo;
         return(await IRepository.Registrar(IdEmpleado, Tipo));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
        public async Task <Guid> VerificarCodigoBarra()
        {
            try
            {
                RegistroEntradaSalida model = new RegistroEntradaSalida();

                model.CodigoBarra = this.CodigoBarra;
                model             = await IRepository.VerificarCodigoBarra(model);

                //this.IdEmpleado = model.IdEmpleado;
                return(model.IdEmpleado);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
        public async Task <RegistroEntradaSalida> VerificarCodigoBarra(RegistroEntradaSalida element)
        {
            try
            {
                using (IDbConnection conexion = new SqlConnection(WebConnectionString))
                {
                    conexion.Open();
                    var dynamicParameters = new DynamicParameters();
                    dynamicParameters.Add("@CodigoBarra", element.CodigoBarra);
                    var result = await conexion.ExecuteScalarAsync <Guid>("[General].[SPCID_VerificaCodigoBarra]", param : dynamicParameters, commandType : CommandType.StoredProcedure);

                    element.IdEmpleado = result;
                    return(element);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
0
 public Task <RegistroEntradaSalida> UpdateAsync(RegistroEntradaSalida element, object IdUsuario)
 {
     throw new NotImplementedException();
 }