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); }
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); }
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); } }
void IConexion.ExecuteNonQuery(System.Data.Common.DbCommand command) { DBConexion.ExecuteNonQuery(command); }