示例#1
0
    public static RECETEMP GetRECETEMPByID(int id)
    {
        RECETEMP            rECETEMP            = new RECETEMP();
        SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider();

        rECETEMP = sqlRECETEMPProvider.GetRECETEMPByID(id);
        return(rECETEMP);
    }
示例#2
0
    public int InsertRECETEMP(RECETEMP rECETEMP)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertRECETEMP", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@RECETEMPID", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Parameters.Add("@RECEID", SqlDbType.Int).Value         = rECETEMP.RECEID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return((int)cmd.Parameters["@RECETEMPID"].Value);
        }
    }
示例#3
0
    public bool UpdateRECETEMP(RECETEMP rECETEMP)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_UpdateRECETEMP", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@RECETEMPID", SqlDbType.Int).Value = rECETEMP.RECETEMPID;
            cmd.Parameters.Add("@RECEID", SqlDbType.Int).Value     = rECETEMP.RECEID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return(result == 1);
        }
    }
示例#4
0
 public RECETEMP GetRECETEMPFromReader(IDataReader reader)
 {
     try
     {
         RECETEMP rECETEMP = new RECETEMP
                             (
             (int)reader["RECETEMPID"],
             (int)reader["RECEID"]
                             );
         return(rECETEMP);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#5
0
    public static bool UpdateRECETEMP(RECETEMP rECETEMP)
    {
        SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider();

        return(sqlRECETEMPProvider.UpdateRECETEMP(rECETEMP));
    }
示例#6
0
    public static int InsertRECETEMP(RECETEMP rECETEMP)
    {
        SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider();

        return(sqlRECETEMPProvider.InsertRECETEMP(rECETEMP));
    }