Ejemplo n.º 1
0
 public WUABOVE3000 GetWUABOVE3000FromReader(IDataReader reader)
 {
     try
     {
         WUABOVE3000 wUABOVE3000 = new WUABOVE3000
                                   (
             (int)reader["WUABOVE3000ID"],
             (DateTime)reader["DT"],
             reader["CUST_ID"].ToString(),
             reader["SENDERNAME"].ToString(),
             reader["SENDERADDRESS"].ToString(),
             reader["SENDERCITY"].ToString(),
             (char)reader["SENDERSTATE"],
             reader["SENDERZIP"].ToString(),
             (int)reader["AMOUNT"],
             reader["MTCN"].ToString(),
             (int)reader["EMP_ID"],
             (int)reader["STATION_ID"],
             (int)reader["SHIFT_ID"]
                                   );
         return(wUABOVE3000);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
    public bool UpdateWUABOVE3000(WUABOVE3000 wUABOVE3000)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_UpdateWUABOVE3000", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@WUABOVE3000ID", SqlDbType.Int).Value     = wUABOVE3000.WUABOVE3000ID;
            cmd.Parameters.Add("@DT", SqlDbType.DateTime).Value           = wUABOVE3000.DT;
            cmd.Parameters.Add("@CUST_ID", SqlDbType.VarChar).Value       = wUABOVE3000.CUST_ID;
            cmd.Parameters.Add("@SENDERNAME", SqlDbType.VarChar).Value    = wUABOVE3000.SENDERNAME;
            cmd.Parameters.Add("@SENDERADDRESS", SqlDbType.VarChar).Value = wUABOVE3000.SENDERADDRESS;
            cmd.Parameters.Add("@SENDERCITY", SqlDbType.VarChar).Value    = wUABOVE3000.SENDERCITY;
            cmd.Parameters.Add("@SENDERSTATE", SqlDbType.Char).Value      = wUABOVE3000.SENDERSTATE;
            cmd.Parameters.Add("@SENDERZIP", SqlDbType.VarChar).Value     = wUABOVE3000.SENDERZIP;
            cmd.Parameters.Add("@AMOUNT", SqlDbType.Int).Value            = wUABOVE3000.AMOUNT;
            cmd.Parameters.Add("@MTCN", SqlDbType.VarChar).Value          = wUABOVE3000.MTCN;
            cmd.Parameters.Add("@EMP_ID", SqlDbType.Int).Value            = wUABOVE3000.EMP_ID;
            cmd.Parameters.Add("@STATION_ID", SqlDbType.Int).Value        = wUABOVE3000.STATION_ID;
            cmd.Parameters.Add("@SHIFT_ID", SqlDbType.Int).Value          = wUABOVE3000.SHIFT_ID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
Ejemplo n.º 3
0
    public static WUABOVE3000 GetWUABOVE3000ByID(int id)
    {
        WUABOVE3000            wUABOVE3000            = new WUABOVE3000();
        SqlWUABOVE3000Provider sqlWUABOVE3000Provider = new SqlWUABOVE3000Provider();

        wUABOVE3000 = sqlWUABOVE3000Provider.GetWUABOVE3000ByID(id);
        return(wUABOVE3000);
    }
Ejemplo n.º 4
0
    public static bool UpdateWUABOVE3000(WUABOVE3000 wUABOVE3000)
    {
        SqlWUABOVE3000Provider sqlWUABOVE3000Provider = new SqlWUABOVE3000Provider();

        return(sqlWUABOVE3000Provider.UpdateWUABOVE3000(wUABOVE3000));
    }
Ejemplo n.º 5
0
    public static int InsertWUABOVE3000(WUABOVE3000 wUABOVE3000)
    {
        SqlWUABOVE3000Provider sqlWUABOVE3000Provider = new SqlWUABOVE3000Provider();

        return(sqlWUABOVE3000Provider.InsertWUABOVE3000(wUABOVE3000));
    }