public static void SuaHDN(DTO_HDN hdn) { SqlCommand cmd = new SqlCommand("sp_suaHDN", DataProvider.con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@mahdn", SqlDbType.VarChar, 50); cmd.Parameters.Add("@manv", SqlDbType.VarChar, 50); cmd.Parameters.Add("@mancu", SqlDbType.VarChar, 50); cmd.Parameters.Add("@ngaylaphd", SqlDbType.VarChar, 50); cmd.Parameters.Add("@sl", SqlDbType.VarChar, 100); cmd.Parameters.Add("@tongtien", SqlDbType.VarChar, 100); cmd.Parameters.Add("@dathanhtoan", SqlDbType.VarChar, 100); cmd.Parameters.Add("@conno", SqlDbType.NVarChar, 100); cmd.Parameters.Add("@ngayhhtt", SqlDbType.VarChar, 50); //Gan gia tri cmd.Parameters["@mahdn"].Value = hdn.Mahdn; cmd.Parameters["@manv"].Value = hdn.Manv; cmd.Parameters["@mancu"].Value = hdn.Mancu; cmd.Parameters["@ngaylaphd"].Value = hdn.Ngaylaphd; cmd.Parameters["@sl"].Value = hdn.Sl; cmd.Parameters["@tongtien"].Value = hdn.Tongtien; cmd.Parameters["@dathanhtoan"].Value = hdn.Dathanhtoan; cmd.Parameters["@conno"].Value = hdn.Conno; cmd.Parameters["@ngayhhtt"].Value = hdn.Ngayhhtt; if (DataProvider.con.State == ConnectionState.Closed) { DataProvider.con.Open(); } cmd.ExecuteNonQuery(); DataProvider.disconnect(); }
public static void suaHDN(DTO_HDN hdn) { DAO_HDN.SuaHDN(hdn); }
public static void themHDN(DTO_HDN hdn) { DAO_HDN.ThemHDN(hdn); }