public string GetData(ref DataTable tbl) { try { clsDatabase cls = new clsDatabase(); cls.OpenConnect(); string[] Values = new string[] { PK_Maloaihinh, Tenloaihinh, Gia, Ngaythem, Ngayhuy, Danghoatdong }; if (Paras.Length != Values.Length) { return("Tham bien va tham tri khong tuong thich"); } else { cls.getValue(ref tbl, "SPSelectBangGia", Paras, Values); } cls.CloseConnect(); } catch (Exception ex) { error = ex.ToString(); MessageBox.Show("Có lỗi\n" + ex.Message); } return(error); }
public string GetData(ref DataTable tbl) { try { clsDatabase cls = new clsDatabase(); cls.OpenConnect(); string[] Values = new string[] { PK_MaBN, Hoten, CMND, Ngaysinh, Gioitinh, Diachi, Sodienthoai }; if (Paras.Length != Values.Length) { return("Tham bien va tham tri khong tuong thich"); } else { cls.getValue(ref tbl, "SPSelectBenhNhan", Paras, Values); } cls.CloseConnect(); } catch (Exception ex) { error = ex.ToString(); MessageBox.Show("Co loi " + ex.Message); } return(error); }
public string GetData(ref DataTable tbl) { try { clsDatabase cls = new clsDatabase(); cls.OpenConnect(); string[] Values = new string[] { PK_Bacsi, TenBS, Trinhdo, Chuyenkhoa, Ngaybatdau, Namkinhnghiem }; if (Paras.Length != Values.Length) { return("Tham bien va tham tri khong tuong thich"); } else { cls.getValue(ref tbl, "SPSelectBacsi", Paras, Values); } cls.CloseConnect(); } catch (Exception ex) { error = ex.ToString(); MessageBox.Show("Co loi " + ex.Message); } return(error); }
public string GetData_TimKiem(ref DataTable tbl) { try { clsDatabase cls = new clsDatabase(); cls.OpenConnect(); string[] Values = new string[] { PK_MaPhieu, TenBN, TenBS, Dontiep, Dientim, Noi, Noinhi, Noi4, Ngoai, San, Xquang, Sieuam, Sinhhoa, Huyethoc, Taimuihong, Ranghammat, Ngaykham, Tongtien }; if (Paras_TimKiem.Length != Values.Length) { return("Tham bien va tham tri khong tuong thich"); } else { cls.getValue(ref tbl, "SPSelectPhieuKham_TimKiem", Paras_TimKiem, Values); } cls.CloseConnect(); } catch (Exception ex) { error = ex.ToString(); MessageBox.Show("Co loi " + ex.Message); } return(error); }