Beispiel #1
0
    public static VAULTTRANS GetVAULTTRANSByID(int id)
    {
        VAULTTRANS            vAULTTRANS            = new VAULTTRANS();
        SqlVAULTTRANSProvider sqlVAULTTRANSProvider = new SqlVAULTTRANSProvider();

        vAULTTRANS = sqlVAULTTRANSProvider.GetVAULTTRANSByID(id);
        return(vAULTTRANS);
    }
    public int InsertVAULTTRANS(VAULTTRANS vAULTTRANS)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertVAULTTRANS", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@VAULTTRANSID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@DT", SqlDbType.DateTime).Value          = vAULTTRANS.DT;
            cmd.Parameters.Add("@STATIONID", SqlDbType.Int).Value        = vAULTTRANS.STATIONID;
            cmd.Parameters.Add("@AMOUNT", SqlDbType.Int).Value           = vAULTTRANS.AMOUNT;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@VAULTTRANSID"].Value);
        }
    }
 public VAULTTRANS GetVAULTTRANSFromReader(IDataReader reader)
 {
     try
     {
         VAULTTRANS vAULTTRANS = new VAULTTRANS
                                 (
             (int)reader["VAULTTRANSID"],
             (DateTime)reader["DT"],
             (int)reader["STATIONID"],
             (int)reader["AMOUNT"]
                                 );
         return(vAULTTRANS);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Beispiel #4
0
    public static bool UpdateVAULTTRANS(VAULTTRANS vAULTTRANS)
    {
        SqlVAULTTRANSProvider sqlVAULTTRANSProvider = new SqlVAULTTRANSProvider();

        return(sqlVAULTTRANSProvider.UpdateVAULTTRANS(vAULTTRANS));
    }
Beispiel #5
0
    public static int InsertVAULTTRANS(VAULTTRANS vAULTTRANS)
    {
        SqlVAULTTRANSProvider sqlVAULTTRANSProvider = new SqlVAULTTRANSProvider();

        return(sqlVAULTTRANSProvider.InsertVAULTTRANS(vAULTTRANS));
    }