private void ParCfg_TblStructInit() { string[] sFieldName = { "ItemName", "PlcConn", "dBlock", "ItemType", "ItemAddr", "ItemNum", "InitVal", "Comment" }; string[] sDataType = { "Varchar", "Varchar", "Varchar", "Varchar", "Varchar", "int", "Varchar", "Varchar" }; int[] iMaxLen = { 24, 24, 16, 24, 16, 0, 16, 32 }; string[] sAllowNull = { "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null" }; ParCfg_DgViewPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //******************************************************************************************************************************************************* Control[] cItemCon = { ItemNameTxtBox, PlcConnTxtBox, dBlockTxtBox, ItemTypeCboBox, ItemAddrTxtBox, ItemNumNumedt, InitValTxtBox, CommentTxtBox }; string[] sConType = { "TextBox", "TextBox", "TextBox", "ComboBox", "TextBox", "NumericEdit", "TextBox", "TextBox" }; ParCfg_DgViewPtr.DgViewParProc(ParCfg_DgView, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1, ItemLbl_2, ItemLbl_3, ItemLbl_4, ItemLbl_5, ItemLbl_6, ItemLbl_7 }; for (int k = 0; k < sFieldCap.Length; k++) { ItemLblPtr[k].Text = sFieldCap[k]; } //************************************************************************************************************************************************** ItemTypeInit(); }
private void TableStructParInit() { string[] sFieldName = { "ButtItemName", "BitInfo_0", "BitInfo_1", "BitInfo_2", "BitInfo_3", "BitInfo_4", "BitInfo_5", "BitInfo_6", "BitInfo_7" }; string[] sDataType = { "Varchar", "Varchar", "Varchar", "Varchar", "Varchar", "Varchar", "Varchar", "Varchar", "Varchar" }; int[] iMaxLen = { 32, 16, 16, 16, 24, 16, 16, 16, 16 }; string[] sAllowNull = { "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null" }; ParCfg_DgViewPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //************************************************************************************************************************************************** Control[] cItemCon = { ItemCon_0, ItemCon_1, ItemCon_2, ItemCon_3, ItemCon_4, ItemCon_5, ItemCon_6, ItemCon_7, ItemCon_8 }; string[] sConType = { "ComboBox", "TextBox", "TextBox", "TextBox", "TextBox", "TextBox", "TextBox", "TextBox", "TextBox" }; ParCfg_DgViewPtr.DgViewParProc(ParCfg_DgView, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1, ItemLbl_2, ItemLbl_3, ItemLbl_4, ItemLbl_5, ItemLbl_6, ItemLbl_7, ItemLbl_8 }; for (int k = 0; k < sFieldCap.Length; k++) { ItemLblPtr[k].Text = sFieldCap[k]; } //********************************************************************************************************************************** DataTable ButtDebugTbl = TSqlDbClass.RetnTblBySqlCmd(ParCfg_DgViewPtr.sSqlConn, "Select * From OpcItemTbl_" + "DebugButtPar"); if (ButtDebugTbl != null && ButtDebugTbl.Rows.Count > 0) { for (int k = 0; k < ButtDebugTbl.Rows.Count; k++) { ItemCon_0.Items.Add(ButtDebugTbl.Rows[k]["ItemName"].ToString()); } ItemCon_0.SelectedIndex = 0; } }
private void ParCfg_TblInit() { string[] sFieldName = { "ID", "Thick" }; string[] sDataType = { "Int", "Float" }; int[] iMaxLen = { 0, 0, }; string[] sAllowNull = { "Not Null", "Not Null" }; ParCfg_DgViewPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //******************************************************************************************************************************************************* Control[] cItemCon = { ItemCon_0, ItemCon_1 }; string[] sConType = { "NumericEdit", "NumericEdit" }; ParCfg_DgViewPtr.DgViewParProc(ParCfg_DgView, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** //Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1 }; //for (int k = 0; k < sFieldCap.Length; k++) ItemLblPtr[k].Text = sFieldCap[k]; }
private void DgView_TblStructParInit() { string[] sFieldName = { "ProdName", "ProdID", "UpLimit", "DnLimit", "CaliUpLimit", "CaliDnLimit", "DiffUpLimit", "PreMeasSpan", "MeasCpes", "Spare1", "Spare2" }; string[] sDataType = { "Varchar", "Int", "Float", "Float", "Float", "Float", "Float", "Float", "Float", "Float", "Float" }; int[] iMaxLen = { 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; string[] sAllowNull = { "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null", "Not Null" }; DgViewRecPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //******************************************************************************************************************************************************* Control[] cItemCon = { ItemCon_0, ItemCon_1, ItemCon_2, ItemCon_3, ItemCon_9, ItemCon_10, ItemCon_4, ItemCon_5, ItemCon_6, ItemCon_7, ItemCon_8 }; string[] sConType = { "TextBox", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit", "NumericEdit" }; DgViewRecPtr.DgViewParProc(DgViewRec, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** //Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1, ItemLbl_2, ItemLbl_3, ItemLbl_4, ItemLbl_5, ItemLbl_6, ItemLbl_7, ItemLbl_8, ItemLbl_9, ItemLbl_10, ItemLbl_11 }; //for (int k = 0; k < sFieldCap.Length; k++) ItemLblPtr[k].Text = sFieldCap[k]; }
private void TableStructParInit() { string[] sFieldName = { "OpcGroupName", "OpcGroupMode", "ReqUpdateRate", "Comment" }; string[] sDataType = { "Varchar", "Varchar", "int", "Varchar" }; int[] iMaxLen = { 32, 24, 0, 48 }; string[] sAllowNull = { "Not Null", "Not Null", "Not Null", "Not Null" }; ParCfg_DgViewPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //******************************************************************************************************************************************************* Control[] cItemCon = { ItemCon_0, ItemCon_1, ItemCon_2, ItemCon_3 }; string[] sConType = { "TextBox", "ComboBox", "NumericEdit", "TextBox" }; ParCfg_DgViewPtr.DgViewParProc(ParCfg_DgView, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1, ItemLbl_2, ItemLbl_3 }; for (int k = 0; k < sFieldCap.Length; k++) { ItemLblPtr[k].Text = sFieldCap[k]; } }
private void TableStructParInit() { string[] sFieldName = { "AlarmItem", "AlarmType", "AlarmInfo" }; string[] sDataType = { "Varchar", "Varchar", "Varchar" }; int[] iMaxLen = { 16, 8, 64 }; string[] sAllowNull = { "Not Null", "Not Null", "Not Null" }; ParCfg_DgViewPtr.TableParProc(sFieldName, sDataType, iMaxLen, sAllowNull); //表结构参数初始化 //************************************************************************************************************************************************** Control[] cItemCon = { ItemCon_0, ItemCon_1, ItemCon_2 }; string[] sConType = { "ComboBox", "ComboBox", "TextBox" }; ParCfg_DgViewPtr.DgViewParProc(ParCfg_DgView, sFieldCap, cItemCon, sConType, btnRecAdd, btnRecModi, btnRecUp, btnRecDel, btnRecDn); //************************************************************************************************************************************************** Label[] ItemLblPtr = { ItemLbl_0, ItemLbl_1, ItemLbl_2 }; for (int k = 0; k < sFieldCap.Length; k++) { ItemLblPtr[k].Text = sFieldCap[k]; } CommentCboBox.Items.Clear(); DataTable AlarmItemTbl = TSqlDbClass.RetnTblBySqlCmd(ParCfg_DgViewPtr.sSqlConn, "Select * From OpcItemTbl_" + "AlarmMsgPar"); if (AlarmItemTbl != null && AlarmItemTbl.Rows.Count > 0) { for (int k = 0; k < AlarmItemTbl.Rows.Count; k++) { ItemCon_0.Items.Add(AlarmItemTbl.Rows[k]["ItemName"].ToString()); CommentCboBox.Items.Add(AlarmItemTbl.Rows[k]["Comment"].ToString()); } ItemCon_0.SelectedIndex = 0; } ItemCon_1.SelectedIndex = 0; }