public static VAULT GetVAULTByID(int id) { VAULT vAULT = new VAULT(); SqlVAULTProvider sqlVAULTProvider = new SqlVAULTProvider(); vAULT = sqlVAULTProvider.GetVAULTByID(id); return(vAULT); }
public void Dispose() { if (VAULT != null) { VAULT.LogOutSilent(); } if (MFilesServer != null) { MFilesServer.Disconnect(); } }
public int InsertVAULT(VAULT vAULT) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertVAULT", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@VAULTID", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add("@VAULTAMOUNT", SqlDbType.Int).Value = vAULT.VAULTAMOUNT; connection.Open(); int result = cmd.ExecuteNonQuery(); return((int)cmd.Parameters["@VAULTID"].Value); } }
public bool UpdateVAULT(VAULT vAULT) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_UpdateVAULT", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@VAULTID", SqlDbType.Int).Value = vAULT.VAULTID; cmd.Parameters.Add("@VAULTAMOUNT", SqlDbType.Int).Value = vAULT.VAULTAMOUNT; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public VAULT GetVAULTFromReader(IDataReader reader) { try { VAULT vAULT = new VAULT ( (int)reader["VAULTID"], (int)reader["VAULTAMOUNT"] ); return(vAULT); } catch (Exception ex) { return(null); } }
public static bool UpdateVAULT(VAULT vAULT) { SqlVAULTProvider sqlVAULTProvider = new SqlVAULTProvider(); return(sqlVAULTProvider.UpdateVAULT(vAULT)); }
public static int InsertVAULT(VAULT vAULT) { SqlVAULTProvider sqlVAULTProvider = new SqlVAULTProvider(); return(sqlVAULTProvider.InsertVAULT(vAULT)); }