Exemple #1
0
    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();
     }
 }
Exemple #3
0
    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);
        }
    }
Exemple #4
0
    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);
        }
    }
Exemple #5
0
 public VAULT GetVAULTFromReader(IDataReader reader)
 {
     try
     {
         VAULT vAULT = new VAULT
                       (
             (int)reader["VAULTID"],
             (int)reader["VAULTAMOUNT"]
                       );
         return(vAULT);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Exemple #6
0
    public static bool UpdateVAULT(VAULT vAULT)
    {
        SqlVAULTProvider sqlVAULTProvider = new SqlVAULTProvider();

        return(sqlVAULTProvider.UpdateVAULT(vAULT));
    }
Exemple #7
0
    public static int InsertVAULT(VAULT vAULT)
    {
        SqlVAULTProvider sqlVAULTProvider = new SqlVAULTProvider();

        return(sqlVAULTProvider.InsertVAULT(vAULT));
    }