private void AddUserGroup_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetRoleData(dataSet); technologyLib.GetUserPopedomData(dataSet); technologyLib.GetUserGrpDetailsViewData(dataSet); technologyLib.GetUserGrpData(dataSet, UserGrpName); m_UserGrpID = technologyLib.GetUserGrpID(UserGrpName); switch (m_OperateFlag) { case 1: //添加 break; case 2: //属性 for (int i = 0; i < dataSet.Tables["UserGrpDetailsView"].Rows.Count; i++) { if (m_UserGrpID == Convert.ToInt16(dataSet.Tables["UserGrpDetailsView"].Rows[i]["UserGrpID"])) { richTextBox1.Text = dataSet.Tables["UserGrpDetailsView"].Rows[i]["Description"].ToString(); break; } } break; } }
private void AddDebugItemProject_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetDebugItemProjectData(dataSet); m_ProjectID = technologyLib.GetDebugItemProjectID(ProjectName); switch (m_OperateFlag) { case 1: break; case 2: for (int i = 0; i < dataSet.Tables["DebugItemProject"].Rows.Count;i++ ) { if (m_ProjectID == Convert.ToInt32(dataSet.Tables["DebugItemProject"].Rows[i]["ProjectID"])) { textBox1.Text = dataSet.Tables["DebugItemProject"].Rows[i]["ProjectID"].ToString(); richTextBox1.Text = dataSet.Tables["DebugItemProject"].Rows[i]["Description"].ToString(); } else { return; } } break; } }
private void CmdItemInfo_Load(object sender, EventArgs e) { technologylib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologylib.GetCmdItemDetailsViewData(dataSet); InitialListView(listView1); }
private void AddFlow_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetFlowDetailsData(dataSet); m_FlowID = technologyLib.GetFlowID(FlowName); //获取子工序名称 technologyLib.GetFlowSubData(dataSet); for (int i = 0;i < dataSet.Tables["FlowSub"].Rows.Count;i++ ) { this.comboBox1.Items.Add(dataSet.Tables["FlowSub"].Rows[i][1]); } switch (m_OperateFlag) { case 1: //添加 break; case 2: //属性 for (int i = 0; i < dataSet.Tables["FlowDetails"].Rows.Count; i++) { if (m_FlowID == Convert.ToInt16(dataSet.Tables["FlowDetails"].Rows[i]["FlowID"])) { textBox1.Text = dataSet.Tables["FlowDetails"].Rows[i]["FlowName"].ToString(); richTextBox1.Text = dataSet.Tables["FlowDetails"].Rows[i]["Description"].ToString(); break; } } break; } }
private void UserInfo_Load(object sender, EventArgs e) { TechnologyLib technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetUserGrpDetailsViewData(dataSet); technologyLib.GetUserInfoDetailsViewData(dataSet); InitialTreeView(treeView1); }
public UserInfo(SqlConnection mainConnection) { InitializeComponent(); sqlConnection = mainConnection; TechnologyLib technologyLib = new TechnologyLib(sqlConnection); listViewColumnSorter = new ListViewColumnSorter(); this.listView1.ListViewItemSorter = listViewColumnSorter; }
private void DebugItemInfo_Load(object sender, EventArgs e) { technologylib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologylib.GetDebugItemViewData(dataSet); technologylib.GetDebugItemDetailsViewData(dataSet); InitialTreeView(treeView1); }
private void FlowProjectInfo_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetFlowProjectData(dataSet); technologyLib.GetFlowProjectDetailsViewData(dataSet); InitialTreeView(treeView1); }
private void AddDebugItemProjectDetails_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetDebugItemData(dataSet); technologyLib.GetDebugItemProjectDetailsViewData(dataSet, DebugItemProjectName); m_DebugItemProjectID = technologyLib.GetDebugItemProjectID(DebugItemProjectName); InitialListView1(listView1); InitialListView2(listView2); }
private void AddCmdItemForm_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetCmdItemDetailsViewData(dataSet); technologyLib.GetProtocalData(dataSet); for (int i = 0; i < dataSet.Tables["Protocal"].Rows.Count; i++) { comboBox1.Items.Add(dataSet.Tables["Protocal"].Rows[i][1].ToString()); } technologyLib.GetCommPortData(dataSet); for (int i = 0; i < dataSet.Tables["CommPort"].Rows.Count; i++) { comboBox2.Items.Add(dataSet.Tables["CommPort"].Rows[i][1].ToString()); } }
private void AddUser_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetUserGrpData(dataSet, UserGrpName); technologyLib.GetUserGrpDetailsViewData(dataSet); technologyLib.GetUserInfoDetailsViewData(dataSet); m_UserGrpID = technologyLib.GetUserGrpID(UserGrpName); switch (m_OperateFlag) { case 1: //添加 textBoxBarCode.Text = Convert.ToString(technologyLib.GetUserInfoMaxBarCode() + 1); break; case 2: //属性 textBoxBarCode.ReadOnly = true; for (int i = 0; i < dataSet.Tables["UserInfoDetailsView"].Rows.Count; i++) { if (BarCode == dataSet.Tables["UserInfoDetailsView"].Rows[i]["BarCode"].ToString()) { comboBoxUserGrpName.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["UserGrpName"].ToString(); textBoxBarCode.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["BarCode"].ToString(); textBoxUserName.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["UserName"].ToString(); textBoxUserPsw.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Password"].ToString(); textBoxVerifyPsw.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Password"].ToString(); comboBoxSex.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Sex"].ToString(); textBoxTelephone.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Telephone"].ToString(); dateTimePickerBirthday.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Birthday"].ToString(); richTextBoxDescription.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Description"].ToString(); comboBoxStatus.Text = dataSet.Tables["UserInfoDetailsView"].Rows[i]["Status"].ToString(); break; } } break; } }
private void ProductOrderAssociation_Load(object sender, EventArgs e) { technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); button2.Enabled = false; }
private void ProjectManager_Load(object sender, EventArgs e) { dataSet = new DataSet(); technologyLib = new TechnologyLib(sqlConnection); InitialForm(dataSet); }
private void DeleteForm_Load(object sender, EventArgs e) { //technologyLib = new TechnologyLib(sqlConnection); //dataSet = new DataSet(); //technologyLib.GetUserPopedomData(dataSet); //string textName = "确定要删除调试方案:\r\n" + m_DebugItemProjectName; //m_DebugItemProjectID = technologyLib.GetDebugItemProjectID(m_DebugItemProjectName); technologyLib = new TechnologyLib(sqlConnection); dataSet = new DataSet(); technologyLib.GetUserPopedomData(dataSet); string textName = ""; switch (m_DeleteFlag) { case 1: m_PopedomID = technologyLib.GetUserPopedomID(m_PopedomName); textName = "确定要删除权限方案:\r\n" + m_PopedomName; break; case 2: textName = "确定要删除用户组:\r\n" + m_UserGrpName; break; case 3: textName = "确定要删除用户:\r\n" + m_BarCode; break; case 4: textName = "确定要删除工序:\r\n" + m_FlowName; break; case 5: m_FlowProjectID = technologyLib.GetFlowProjectID(m_FlowProjectName); textName = "确定要删除工序方案:\r\n" + m_FlowProjectName; break; case 6: m_DebugItemID = technologyLib.GetDebugItemID(m_DebugItemName); textName = "确定要删除调试项目:\r\n" + m_DebugItemName; break; case 7: m_DebugItemProjectID = technologyLib.GetDebugItemProjectID(m_DebugItemProjectName); textName = "确定要删除调试方案:\r\n" + m_DebugItemProjectName; break; case 8: m_CmdItemID = technologyLib.GetCmdItemID(m_CmdItemName); textName = "确定要删除调试命令:\r\n" + m_CmdItemName; break; case 9: m_TestRunProjectID = technologyLib.GetT_TestRunProjectID(m_TestRunProjectName); textName = "确定要删除考机方案:\r\n" + m_TestRunProjectName; break; case 10: m_VerifyModuleID = technologyLib.GetVerifyModuleID(m_VerifyModuleName); textName = "确定要删除验证模块:\r\n" + m_VerifyModuleName; break; case 11: m_VerifyPopedomID = technologyLib.GetVerifyPopedomID(m_VerifyPopedomName); textName = "确定要删除验证模块权限方案:\r\n" + m_VerifyPopedomName; break; case 12: m_ModuleClassID = technologyLib.GetModuleClassID(m_ModuleClassName); textName = "确定要删除模块类型名称:\r\n" + m_ModuleClassName; break; case 13: textName = "确定要删除条码编码:\r\n" + m_ModuleCode; break; case 14: textName = "确定要删除装配项目:\r\n" + m_AssembleItemName; break; case 15: textName = "确定要删除装配方案:\r\n" + m_AssembleItemName; break; } richTextBox1.Text = textName; }