Beispiel #1
0
        public int Delete(Guid ClientId)
        {
            int       i         = new int();
            DbCommand DbCommand = default(DbCommand);

            try
            {
                Database ds = default(Database);
                ds        = DatabaseFactory.CreateDatabase(cnstr);
                DbCommand = ds.GetStoredProcCommand("USP_tblMstClient_Delete");
                ds.AddInParameter(DbCommand, "ClientId", DbType.Guid, ClientId);
                i = ds.ExecuteNonQuery(DbCommand);
                DbCommand.Parameters.Clear();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DbCommand.Dispose();
            }
            return(i);
        }
Beispiel #2
0
        public int DeleteAccountNumber(int Uid)
        {
            int       i         = new int();
            DbCommand DbCommand = default(DbCommand);

            try
            {
                Database ds = default(Database);
                ds        = DatabaseFactory.CreateDatabase(cnstr);
                DbCommand = ds.GetStoredProcCommand("USP_tblClientAccMapper_Delete");
                ds.AddInParameter(DbCommand, "Uid", DbType.Int32, Uid);
                i = ds.ExecuteNonQuery(DbCommand);
                DbCommand.Parameters.Clear();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DbCommand.Dispose();
            }
            return(i);
        }
Beispiel #3
0
        public void setInUsuarioMandante(UsuarioMandante user)
        {
            DbCommand cmd = db.GetStoredProcCommand("stp_InUsuarioMandante");

            db.AddInParameter(cmd, "@idUsuario", DbType.String, user.IdUsuario);
            db.AddInParameter(cmd, "@IdMandante", DbType.String, user.IdMandante);

            try
            {
                db.ExecuteNonQuery(cmd);
            }
            catch (SqlException ex)
            {
                throw new Exception("No se pudo ingresar el usuario mandante, " + ex.Message, ex);
            }
            catch (Exception ex)
            {
                throw new Exception("No se pudo ingresar el usuario mandante, " + ex.Message, ex);
            }
        }
Beispiel #4
0
 void IConexion.ExecuteNonQuery(System.Data.Common.DbCommand command)
 {
     DBConexion.ExecuteNonQuery(command);
 }