public string ConnectServer() { try { this.sqlConnection.Open(); this.GetLoginInfomation(); this.Ready = true; return("Kết nối thành công!"); } catch (SqlException SqlE) { return(SqlMessageResolver.SqlMessageResolve(SqlE)); } }
public static void updateAll() { try { TableAdapterManager.UpdateAll(QLVT_CN_DataSet); } catch (SqlException e) { MessageBox.Show(SqlMessageResolver.SqlMessageResolve(e)); } catch (ArgumentException e) { MessageBox.Show(e.Message); } }
public static void FillAllTable() { try { // fill tables ChiNhanhTableAdapter.Fill(QLVT_CN_DataSet.ChiNhanh); CTDDHTableAdapter.Fill(QLVT_CN_DataSet.CTDDH); CTPNTableAdapter.Fill(QLVT_CN_DataSet.CTPN); CTPXTableAdapter.Fill(QLVT_CN_DataSet.CTPX); DatHangTableAdapter.Fill(QLVT_CN_DataSet.DatHang); KhoTableAdapter.Fill(QLVT_CN_DataSet.Kho); NhanVienTableAdapter.Fill(QLVT_CN_DataSet.NhanVien); PhieuNhapTableAdapter.Fill(QLVT_CN_DataSet.PhieuNhap); VattuTableAdapter.Fill(QLVT_CN_DataSet.Vattu); } catch (SqlException e) { MessageBox.Show(SqlMessageResolver.SqlMessageResolve(e)); } }