public void Xoa(BaoCaoDaiLyBuuDienVHX_InFo baocao) { SqlCommand cmd = new SqlCommand("delete from BaoCaoDaiLyBuuDienVHX where MaBCDaiLyBuuDienVHX=@mabaocao and MaDaiLyBuuDienVHX=@madaily"); cmd.Parameters.Add("mabaocao", SqlDbType.Int).Value = baocao.Maubaocao.MaMauBaoCaoDaiLyBuuDien; cmd.Parameters.Add("madaily", SqlDbType.Int).Value = baocao.DaiLyBuuDien.MaDaiLyBuuDien; ds.Execute(cmd); }
public void Sua(BaoCaoDaiLyBuuDienVHX_InFo baocao) { SqlCommand cmd = new SqlCommand("update BaoCaoDaiLyBuuDienVHX set DienThoai=@dienthoai,GhiChu=@ghichu where MaBCDaiLyBuuDienVHX=@mabaocao and MaDaiLyBuuDienVHX=@madaily"); cmd.Parameters.Add("mabaocao", SqlDbType.Int).Value = baocao.Maubaocao.MaMauBaoCaoDaiLyBuuDien; cmd.Parameters.Add("madaily", SqlDbType.Int).Value = baocao.DaiLyBuuDien.MaDaiLyBuuDien; cmd.Parameters.Add("dienthoai", SqlDbType.VarChar, 15).Value = baocao.DienThoai; cmd.Parameters.Add("ghichu", SqlDbType.NVarChar, 200).Value = baocao.Ghichu; ds.Execute(cmd); }
public void Them(BaoCaoDaiLyBuuDienVHX_InFo baocao) { SqlCommand cmd = new SqlCommand("insert into BaoCaoDaiLyBuuDienVHX(MaBCDaiLyBuuDienVHX,MaDaiLyBuuDienVHX,DienThoai,GhiChu) values(@mabaocao,@madaily,@dienthoai,@ghichu)"); cmd.Parameters.Add("mabaocao", SqlDbType.Int).Value = baocao.Maubaocao.MaMauBaoCaoDaiLyBuuDien; cmd.Parameters.Add("madaily", SqlDbType.Int).Value = baocao.DaiLyBuuDien.MaDaiLyBuuDien; cmd.Parameters.Add("dienthoai", SqlDbType.NVarChar, 15).Value = baocao.DienThoai; cmd.Parameters.Add("ghichu", SqlDbType.NVarChar, 200).Value = baocao.Ghichu; ds.Execute(cmd); }
public void Sua_vhx(BaoCaoDaiLyBuuDienVHX_InFo baocao) { dbbaocao.Sua(baocao); }
public void Xoa_vhx(BaoCaoDaiLyBuuDienVHX_InFo baocao) { dbbaocao.Xoa(baocao); }
public void Them_vhx(BaoCaoDaiLyBuuDienVHX_InFo baocao) { dbbaocao.Them(baocao); }