public static RECETEMP GetRECETEMPByID(int id) { RECETEMP rECETEMP = new RECETEMP(); SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider(); rECETEMP = sqlRECETEMPProvider.GetRECETEMPByID(id); return(rECETEMP); }
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); } }
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); } }
public RECETEMP GetRECETEMPFromReader(IDataReader reader) { try { RECETEMP rECETEMP = new RECETEMP ( (int)reader["RECETEMPID"], (int)reader["RECEID"] ); return(rECETEMP); } catch (Exception ex) { return(null); } }
public static bool UpdateRECETEMP(RECETEMP rECETEMP) { SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider(); return(sqlRECETEMPProvider.UpdateRECETEMP(rECETEMP)); }
public static int InsertRECETEMP(RECETEMP rECETEMP) { SqlRECETEMPProvider sqlRECETEMPProvider = new SqlRECETEMPProvider(); return(sqlRECETEMPProvider.InsertRECETEMP(rECETEMP)); }