public int update(ChucVuEntities obj) { int result = 0; string strQuery = "update dbo.ChucVu set TenChucVu='" + obj.Tencv + "',PhuCapCV='" + obj.Phucapcv + "' where MaChucVu='" + obj.Macv + "'"; DataConfig config = new DataConfig(); result = config.excuteNonquery(strQuery); //thucthi return(result); //tra ve so ban ghi }
public int Insert(ChucVuEntities obj) { int result = 0; string strQuery = "insert into dbo.ChucVu(MaChucVu,TenChucVu,PhuCapCV) values('" + obj.Macv + "','" + obj.Tencv + "','" + obj.Phucapcv + "')"; DataConfig config = new DataConfig(); result = config.excuteNonquery(strQuery); //thucthi return(result); //tra ve so ban ghi }