public static IMGAE GetIMGAEByID(int id) { IMGAE iMGAE = new IMGAE(); SqlIMGAEProvider sqlIMGAEProvider = new SqlIMGAEProvider(); iMGAE = sqlIMGAEProvider.GetIMGAEByID(id); return(iMGAE); }
public int InsertIMGAE(IMGAE iMGAE) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertIMGAE", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@IMGAEID", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add("@IMG", SqlDbType.Image).Value = iMGAE.IMG; connection.Open(); int result = cmd.ExecuteNonQuery(); return((int)cmd.Parameters["@IMGAEID"].Value); } }
public bool UpdateIMGAE(IMGAE iMGAE) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_UpdateIMGAE", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@IMGAEID", SqlDbType.Int).Value = iMGAE.IMGAEID; cmd.Parameters.Add("@IMG", SqlDbType.Image).Value = iMGAE.IMG; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public IMGAE GetIMGAEFromReader(IDataReader reader) { try { IMGAE iMGAE = new IMGAE ( (int)reader["IMGAEID"], reader["IMG"].ToString() ); return(iMGAE); } catch (Exception ex) { return(null); } }
public static bool UpdateIMGAE(IMGAE iMGAE) { SqlIMGAEProvider sqlIMGAEProvider = new SqlIMGAEProvider(); return(sqlIMGAEProvider.UpdateIMGAE(iMGAE)); }
public static int InsertIMGAE(IMGAE iMGAE) { SqlIMGAEProvider sqlIMGAEProvider = new SqlIMGAEProvider(); return(sqlIMGAEProvider.InsertIMGAE(iMGAE)); }