//sửa private void button2_Click(object sender, EventArgs e) { CachDungDTO CachDung = new CachDungDTO(); CachDung.Ma = txtMaCachDung.Text; CachDung.Ten = txtCachDung.Text; DbAck ack = CachDungBUS.Update(CachDung); if (ack == DbAck.Ok) { MessageBox.Show("Thay đổi thành công", "Thông báo"); } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông báo"); } else { } } loadListCachdung(); txtCachDung.Text = null; txtMaCachDung.Text = null; }
//thêm thuốc vào hoá đơn private void button1_Click(object sender, EventArgs e) { //ThuocDTO thuoc = new ThuocDTO(); //thuoc = ThuocBUS.getThuoc(cbbThuoc.Text); PhieuKhamBenhDTO phieu = new PhieuKhamBenhDTO(); phieu.MaPhieu = txtMaPhieu.Text; phieu.MaThuoc = cbbThuoc.Text; phieu.SoLuong = int.Parse(txtSl.Text); phieu.Gia = 0; DbAck ack = PhieuKhamBenhBUS.InsertCTPhieu(phieu); if (ack == DbAck.Ok) { MessageBox.Show("Thanh đổi thành công", "Thông báo"); // LoadDsThuoc(); } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông báo"); } else { } } }
private void btnThemPhieu_Click(object sender, EventArgs e) { PhieuKhamBenhDTO phieu = new PhieuKhamBenhDTO(); phieu.MaPhieu = txtMaPhieu.Text; phieu.MaBN = cbbMaBN.Text; phieu.Ngay = DtpDay.Value.Date.ToString("yyyy/MM/dd"); phieu.TrieuChung = txtTrieuChung.Text; phieu.DuDoanBenh = cbbDuDoanBenh.Text; DbAck ack = PhieuKhamBenhBUS.Insert(phieu); if (ack == DbAck.Ok) { MessageBox.Show("Thay đổi thành công", "Thông Báo"); //LoadDsThuoc(); } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông Báo"); } else { } } }
//thêm loại bệnh private void button1_Click(object sender, EventArgs e) { LoaiBenhDTO loaiBenh = new LoaiBenhDTO(); loaiBenh.Ma = txtMaLoaiBenh.Text; loaiBenh.Ten = txtTenLoaiBenh.Text; DbAck ack = LoaiBenhBUS.Insert(loaiBenh); if (ack == DbAck.Ok) { MessageBox.Show("Thêm thành công", "Thông báo"); } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông báo"); } else { } } loadListLoaiBenh(); txtMaLoaiBenh.Text = null; txtTenLoaiBenh.Text = null; }
//thêm private void button1_Click(object sender, EventArgs e) { DonViDTO DonVi = new DonViDTO(); DonVi.TenDonVi = txtTenDonVi.Text; DbAck ack = DonViBUS.Insert(DonVi); if (ack == DbAck.Ok) { MessageBox.Show("Thêm Thành Công", "Thông báo"); } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông báo"); } else { } } loadListDonVi(); txtTenDonVi.Text = null; }
private void btnThayDoi_Click(object sender, EventArgs e) { ThuocDTO Thuoc = new ThuocDTO(); Thuoc.MaThuoc = cbbMaThuoc1.Text; Thuoc.GiaThuoc = int.Parse(txtGiaThuoc1.Text); DbAck ack = ThuocBUS.Update(Thuoc); if (ack == DbAck.Ok) { MessageBox.Show("Thay đổi thành công", "Thông báo"); LoadListThuoc(); GetMaThuoc(); txtGiaThuoc1.Text = null; } else { if (ack == DbAck.Unknown) { MessageBox.Show("Lỗi không xác định", "Thông báo"); } else { } } }
public static DbAck Delete(LoaiBenhDTO LoaiBenh) { DbAck result = DbAck.Unknown; result = LoaiBenhDAO.Delete(LoaiBenh); return(result); }
public static DbAck Delete(CachDungDTO CachDung) { DbAck result = DbAck.Unknown; result = CachDungDAO.Delete(CachDung); return(result); }
public static DbAck Delete(ThuocDTO Thuoc) { DbAck result = DbAck.Unknown; result = ThuocDAO.Delete(Thuoc); return(result); }
public static DbAck Delete(DonViDTO DonVi) { DbAck result = DbAck.Unknown; result = DonViDAO.Delete(DonVi); return(result); }
public static DbAck Insert(CachDungDTO CachDung) { DbAck result = DbAck.Unknown; result = CachDungDAO.Insert(CachDung); return(result); }
public static DbAck Insert(ThuocDTO Thuoc) { DbAck result = DbAck.Unknown; result = ThuocDAO.Insert(Thuoc); return(result); }
public static DbAck Update(TienKhamDTO TienKham) { DbAck result = DbAck.Unknown; result = TienKhamDAO.Update(TienKham); return(result); }
public static DbAck Insert(DonViDTO DonVi) { DbAck result = DbAck.Unknown; result = DonViDAO.Insert(DonVi); return(result); }
public static DbAck Insert(BenhNhanDTO BenhNhan) { DbAck result = DbAck.Unknown; result = BenhNhanDAO.Insert(BenhNhan); return(result); }
public static DbAck InsertCTPhieu(PhieuKhamBenhDTO CTPhieuKham) { // Xu ly kiem tra va tinh toan DbAck result = DbAck.Unknown; result = PhieuKhamBenhDAO.InsertCTPhieu(CTPhieuKham); return(result); }
public static DbAck Update(LoaiBenhDTO LoaiBenh) { // Xu ly kiem tra va tinh toan DbAck result = DbAck.Unknown; result = LoaiBenhDAO.Update(LoaiBenh); return(result); }
public static DbAck Delete(LoaiBenhDTO LoaiBenh) { string sql = "delete from LoaiBenh where ma_loai_benh = @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", LoaiBenh.Ma); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(DbAck.Unknown); }
public static DbAck Delete(CachDungDTO CachDung) { string sql = "delete from CachDung where ma_cach_dung = @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", CachDung.Ma); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(DbAck.Ok); }
public static DbAck Delete(DonViDTO DonVi) { string sql = "delete from DonVi where ten_don_vi = @Ten"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ten", DonVi.TenDonVi); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(DbAck.Unknown); }
public static DbAck Delete(ThuocDTO Thuoc) { string sql = "delete from Thuoc where ma_thuoc = @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", Thuoc.MaThuoc); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(DbAck.Ok); }
public static DbAck Insert(DonViDTO DonVi) { string sql = "insert into DonVi(ten_don_vi) values(@Ten)"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ten", DonVi.TenDonVi); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Update(LoaiBenhDTO LoaiBenh) { string sql = "update LoaiBenh set ten_loai_benh = @Ten where ma_loai_benh= @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", LoaiBenh.Ma); parameter.Add("@Ten", LoaiBenh.Ten); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Update(TienKhamDTO TienKham) { string sql = "update TienKham set tien_kham = @Tien"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Tien", TienKham.Tien); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Update(ThuocDTO Thuoc) { string sql = "update Thuoc set gia_thuoc = @Gia where ma_thuoc= @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", Thuoc.MaThuoc); parameter.Add("@Gia", Thuoc.GiaThuoc); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Insert(CachDungDTO CachDung) { string sql = "insert into CachDung(ma_cach_dung,cach_su_dung) values(@Ma,@Ten)"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", CachDung.Ma); parameter.Add("@Ten", CachDung.Ten); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Update(CachDungDTO CachDung) { string sql = "update CachDung set cach_su_dung = @Ten where ma_cach_dung= @Ma"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", CachDung.Ma); parameter.Add("@Ten", CachDung.Ten); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Insert(LoaiBenhDTO LoaiBenh) { string sql = "insert into LoaiBenh(ma_loai_benh,ten_loai_benh) values(@Ma,@Ten)"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", LoaiBenh.Ma); parameter.Add("@Ten", LoaiBenh.Ten); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck InsertCTPhieu(PhieuKhamBenhDTO CTPhieuKhamBenh) { string sql = "insert into CT_PhieuKhamBenh(ma_phieu_kham_benh,thuoc,so_luong,don_gia) values(@MaPhieu,@MaThuoc,@Sl,@DonGia)"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@MaPhieu", CTPhieuKhamBenh.MaPhieu); parameter.Add("@MaThuoc", CTPhieuKhamBenh.MaThuoc); parameter.Add("@Sl", CTPhieuKhamBenh.SoLuong); parameter.Add("@DonGia", CTPhieuKhamBenh.Gia); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }
public static DbAck Insert(BenhNhanDTO BenhNhan) { string sql = "insert into BenhNhan(ma_benh_nhan,ho_ten,gioi_tinh,nam_sinh,dia_chi) values(@Ma,@Ten,@gioiTinh,@NamSinh,@DiaChi)"; Dictionary <string, object> parameter = new Dictionary <string, object>(); parameter.Add("@Ma", BenhNhan.MaBN); parameter.Add("@Ten", BenhNhan.HoTen); parameter.Add("@gioiTinh", BenhNhan.GioiTinh); parameter.Add("@NamSinh", BenhNhan.NamSinh); parameter.Add("@DiaChi", BenhNhan.DiaChi); DbAck result = DataProvider.ExecNonQuery(sql, parameter); return(result); }