public static IOSQL getInstance(string strDB, string strPwd = null) { if (_ioSQL == null) { _ioSQL = new IOSQL(strDB, strPwd); } return(_ioSQL); }
private void Window_Loaded(object sender, RoutedEventArgs e) { bool isRes = IOSQL.getInstance(uDataBase, strDBPwsd).iSDataBaseOpen(); Debug.WriteLine("report db isconnection {0}", isRes); int count = IOSQL.getInstance(uDataBase, strDBPwsd).numOfCount("Employees"); Debug.WriteLine("receive table row number is " + count); loadMyReport(RES_FRPT); }
private void writeData_Click(object sender, RoutedEventArgs e) { string strSQL = "insert into employees values('aaa','123145464','hereerer','william','xia','1984-06-03')"; IOSQL.getInstance(uDataBase, strDBPwsd).executeSQL(strSQL); }
private void initializeDataBase() { IOSQL.getInstance(uDataBase, strDBPwsd); IOSQL.getInstance(uDataBase).executeSQL(STRSQL.TABLE_EMPLOYYE); }