private void OnForm_Load(object sender, EventArgs e) { ParCfg_DgViewPtr = new DgVBindClass(TGlobalVar.sDataBase, TGlobalVar.sSqlConn, TGlobalVar.sMasterSqlConn, this); ParCfg_TblInit(); if (ParCfg_DgViewPtr.TableBindToDgV("GasketTbl") == false) { MessageBox.Show("垫片数据表创建失败,请检查!"); Close(); } }
private void OnForm_Load(object sender, EventArgs e) { DgViewRecPtr = new DgVBindClass(TGlobalVar.sDataBase, TGlobalVar.sSqlConn, TGlobalVar.sMasterSqlConn, this); DgView_TblStructParInit(); if (DgViewRecPtr.TableBindToDgV("ProdNameTbl") == false) //产品组表 { MessageBox.Show("产品名表创建失败,请检查!"); Close(); } }
private void OnForm_Load(object sender, EventArgs e) { //********************************************************************************* ParCfg_DgViewPtr = new DgVBindClass(TGlobalVar.sDataBase, TGlobalVar.sSqlConn, TGlobalVar.sMasterSqlConn, this); TableStructParInit(); //****************************************************************** if (ParCfg_DgViewPtr.TableBindToDgV("AlarmInfoTbl") == false) { MessageBox.Show("数据表创建失败,请检查!"); Close(); } }
private void OnForm_Load(object sender, EventArgs e) { if (TSqlDbClass.IsDataBaseExist(TGlobalVar.sMasterSqlConn, TGlobalVar.sDataBase) == false) //数据库不存在则创建数据库 { TSqlDbClass.CreateServerDb(TGlobalVar.sMasterSqlConn, Application.StartupPath, TGlobalVar.sDataBase); } //************************************************************ ItemCon_1.SelectedIndex = 0; //Opc组模式 ParCfg_DgViewPtr = new DgVBindClass(TGlobalVar.sDataBase, TGlobalVar.sSqlConn, TGlobalVar.sMasterSqlConn, this); TableStructParInit(); //****************************************************************** if (ParCfg_DgViewPtr.TableBindToDgV("OpcGroupTbl") == false) { MessageBox.Show("数据表创建失败,请检查!"); Close(); } }
private void OnForm_Load(object sender, EventArgs e) { //********************************************************************************* ParCfg_DgViewPtr = new DgVBindClass(TGlobalVar.sDataBase, TGlobalVar.sSqlConn, TGlobalVar.sMasterSqlConn, this); ParCfg_TblStructInit(); //******************************************Opc组名********************************* OpcGroupNameCboBox.SelectedIndex = -1; DataTable OpcGroupNameTbl = TSqlDbClass.RetnTblBySqlCmd(ParCfg_DgViewPtr.sSqlConn, "Select * From OpcGroupTbl"); if (OpcGroupNameTbl.Rows.Count >= 1) { for (int k = 0; k < OpcGroupNameTbl.Rows.Count; k++) { OpcGroupNameCboBox.Items.Add(OpcGroupNameTbl.Rows[k]["OpcGroupName"].ToString()); } OpcGroupNameCboBox.SelectedIndex = 0; //触发 } //********************************************************************************* }