private void ViewContempJHLX_Load(object sender, EventArgs e) { try { Templete temp = new Templete(); temp = _sc.GetContractTemplateJHLX(Id); this.ConTempName.Text = temp.Name.ToString(); this.Column1.Text = temp.ColumnNames[0].ToString(); this.Column2.Text = temp.ColumnNames[1].ToString(); this.Column3.Text = temp.ColumnNames[2].ToString(); this.Column4.Text = temp.ColumnNames[3].ToString(); this.Column5.Text = temp.ColumnNames[4].ToString(); this.Column6.Text = temp.ColumnNames[5].ToString(); this.Sign1.Text = temp.SignDatas[0].SignInfo.ToString(); this.Sign2.Text = temp.SignDatas[1].SignInfo.ToString(); this.Sign3.Text = temp.SignDatas[2].SignInfo.ToString(); this.Sign4.Text = temp.SignDatas[3].SignInfo.ToString(); this.Sign5.Text = temp.SignDatas[4].SignInfo.ToString(); this.Sign6.Text = temp.SignDatas[5].SignInfo.ToString(); this.Sign7.Text = temp.SignDatas[6].SignInfo.ToString(); this.Sign8.Text = temp.SignDatas[7].SignInfo.ToString(); this.Sign9.Text = temp.SignDatas[8].SignInfo.ToString(); this.Sign10.Text = temp.SignDatas[9].SignInfo.ToString(); this.SignPer1.Text = temp.SignDatas[0].SignEmployee.Name.ToString(); this.SignPer2.Text = temp.SignDatas[1].SignEmployee.Name.ToString(); this.SignPer3.Text = temp.SignDatas[2].SignEmployee.Name.ToString(); this.SignPer4.Text = temp.SignDatas[3].SignEmployee.Name.ToString(); this.SignPer5.Text = temp.SignDatas[4].SignEmployee.Name.ToString(); this.SignPer6.Text = temp.SignDatas[5].SignEmployee.Name.ToString(); this.SignPer7.Text = temp.SignDatas[6].SignEmployee.Name.ToString(); this.SignPer8.Text = temp.SignDatas[7].SignEmployee.Name.ToString(); this.SignPer9.Text = temp.SignDatas[8].SignEmployee.Name.ToString(); this.SignPer10.Text = temp.SignDatas[9].SignEmployee.Name.ToString(); } catch { MessageBox.Show("加载数据失败!"); Logging.AddLog("查看内河模板详细信息失败!"); if (MessageBox.Show("好吧,我们的程序出现点问题需要重新启动\n点击\"确定\"重启\n点击\"取消\"退出程序?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { Application.Restart(); } else { Application.Exit(); } } }
public SubmintContempJHLX(int contempId, SignSocketClient sc) : this() { _sc = sc; //下拉框传过来的选中的模版id ContempId = contempId; try { // Templete temp = new Templete(); //SOCKET查询 界河例行模版 temp = _sc.GetContractTemplateJHLX(ContempId); if (temp != null) { UserHelper.SelectedTemp = temp; } this.ConTempName.Text = temp.Name.ToString(); this.Column1.Text = temp.ColumnNames[0].ToString(); this.Column2.Text = temp.ColumnNames[1].ToString(); this.Column3.Text = temp.ColumnNames[2].ToString(); this.Column4.Text = temp.ColumnNames[3].ToString(); this.Column5.Text = temp.ColumnNames[4].ToString(); this.Column6.Text = temp.ColumnNames[5].ToString(); this.Sign1.Text = temp.SignDatas[0].SignInfo.ToString(); this.Sign2.Text = temp.SignDatas[1].SignInfo.ToString(); this.Sign3.Text = temp.SignDatas[2].SignInfo.ToString(); this.Sign4.Text = temp.SignDatas[3].SignInfo.ToString(); this.Sign5.Text = temp.SignDatas[4].SignInfo.ToString(); this.Sign6.Text = temp.SignDatas[5].SignInfo.ToString(); this.Sign7.Text = temp.SignDatas[6].SignInfo.ToString(); this.Sign8.Text = temp.SignDatas[7].SignInfo.ToString(); this.Sign9.Text = temp.SignDatas[8].SignInfo.ToString(); this.Sign10.Text = temp.SignDatas[9].SignInfo.ToString(); this.SignPer1.Text = temp.SignDatas[0].SignEmployee.Name.ToString(); this.SignPer2.Text = temp.SignDatas[1].SignEmployee.Name.ToString(); this.SignPer3.Text = temp.SignDatas[2].SignEmployee.Name.ToString(); this.SignPer4.Text = temp.SignDatas[3].SignEmployee.Name.ToString(); this.SignPer5.Text = temp.SignDatas[4].SignEmployee.Name.ToString(); this.SignPer6.Text = temp.SignDatas[5].SignEmployee.Name.ToString(); this.SignPer7.Text = temp.SignDatas[6].SignEmployee.Name.ToString(); this.SignPer8.Text = temp.SignDatas[7].SignEmployee.Name.ToString(); this.SignPer9.Text = temp.SignDatas[8].SignEmployee.Name.ToString(); this.SignPer10.Text = temp.SignDatas[9].SignEmployee.Name.ToString(); } catch { MessageBox.Show("加载数据失败!"); Logging.AddLog("提交界河专项模板详细信息失败!"); if (MessageBox.Show("好吧,我们的程序出现点问题需要重新启动\n点击\"确定\"重启\n点击\"取消\"退出程序?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { Application.Restart(); } else { Application.Exit(); } } }
private void EditConTempJHLX_Load(object sender, EventArgs e) { BindDepartment(UserHelper.DepList); //绑定部门信息 try { Templete temp = new Templete(); temp = _sc.GetContractTemplateJHLX(Id); this.ConTempName.Text = temp.Name.ToString(); this.Column1.Text = temp.ColumnNames[0].ToString(); this.Column2.Text = temp.ColumnNames[1].ToString(); this.Column3.Text = temp.ColumnNames[2].ToString(); this.Column4.Text = temp.ColumnNames[3].ToString(); this.Column5.Text = temp.ColumnNames[4].ToString(); this.Column6.Text = temp.ColumnNames[5].ToString(); this.Sign1.Text = temp.SignDatas[0].SignInfo.ToString(); this.Sign2.Text = temp.SignDatas[1].SignInfo.ToString(); this.Sign3.Text = temp.SignDatas[2].SignInfo.ToString(); this.Sign4.Text = temp.SignDatas[3].SignInfo.ToString(); this.Sign5.Text = temp.SignDatas[4].SignInfo.ToString(); this.Sign6.Text = temp.SignDatas[5].SignInfo.ToString(); this.Sign7.Text = temp.SignDatas[6].SignInfo.ToString(); this.Sign8.Text = temp.SignDatas[7].SignInfo.ToString(); this.Sign9.Text = temp.SignDatas[8].SignInfo.ToString(); this.Sign10.Text = temp.SignDatas[9].SignInfo.ToString(); this.SignDep1.SelectedValue = temp.SignDatas[0].SignEmployee.Department.Id; this.SignDep2.SelectedValue = temp.SignDatas[1].SignEmployee.Department.Id; this.SignDep3.SelectedValue = temp.SignDatas[2].SignEmployee.Department.Id; this.SignDep4.SelectedValue = temp.SignDatas[3].SignEmployee.Department.Id; this.SignDep5.SelectedValue = temp.SignDatas[4].SignEmployee.Department.Id; this.SignDep6.SelectedValue = temp.SignDatas[5].SignEmployee.Department.Id; this.SignDep7.SelectedValue = temp.SignDatas[6].SignEmployee.Department.Id; this.SignDep8.SelectedValue = temp.SignDatas[7].SignEmployee.Department.Id; this.SignDep9.SelectedValue = temp.SignDatas[8].SignEmployee.Department.Id; this.SignDep10.SelectedValue = temp.SignDatas[9].SignEmployee.Department.Id; this.SignPer1.SelectedValue = temp.SignDatas[0].SignEmployee.Id; this.SignPer2.SelectedValue = temp.SignDatas[1].SignEmployee.Id; this.SignPer3.SelectedValue = temp.SignDatas[2].SignEmployee.Id; this.SignPer4.SelectedValue = temp.SignDatas[3].SignEmployee.Id; this.SignPer5.SelectedValue = temp.SignDatas[4].SignEmployee.Id; this.SignPer6.SelectedValue = temp.SignDatas[5].SignEmployee.Id; this.SignPer7.SelectedValue = temp.SignDatas[6].SignEmployee.Id; this.SignPer8.SelectedValue = temp.SignDatas[7].SignEmployee.Id; this.SignPer9.SelectedValue = temp.SignDatas[8].SignEmployee.Id; this.SignPer10.SelectedValue = temp.SignDatas[9].SignEmployee.Id; this.Sign1Level.SelectedItem = temp.SignDatas[0].SignLevel.ToString(); this.Sign2Level.SelectedItem = temp.SignDatas[1].SignLevel.ToString(); this.Sign3Level.SelectedItem = temp.SignDatas[2].SignLevel.ToString(); this.Sign4Level.SelectedItem = temp.SignDatas[3].SignLevel.ToString(); this.Sign5Level.SelectedItem = temp.SignDatas[4].SignLevel.ToString(); this.Sign6Level.SelectedItem = temp.SignDatas[5].SignLevel.ToString(); this.Sign7Level.SelectedItem = temp.SignDatas[6].SignLevel.ToString(); this.Sign8Level.SelectedItem = temp.SignDatas[7].SignLevel.ToString(); this.Sign9Level.SelectedItem = temp.SignDatas[8].SignLevel.ToString(); this.Sign10Level.SelectedItem = temp.SignDatas[9].SignLevel.ToString(); this.View1.SelectedIndex = temp.SignDatas[0].CanView; this.View2.SelectedIndex = temp.SignDatas[1].CanView; this.View3.SelectedIndex = temp.SignDatas[2].CanView; this.View4.SelectedIndex = temp.SignDatas[3].CanView; this.View5.SelectedIndex = temp.SignDatas[4].CanView; this.View6.SelectedIndex = temp.SignDatas[5].CanView; this.View7.SelectedIndex = temp.SignDatas[6].CanView; this.View8.SelectedIndex = temp.SignDatas[7].CanView; this.View9.SelectedIndex = temp.SignDatas[8].CanView; this.View10.SelectedIndex = temp.SignDatas[9].CanView; this.Download1.SelectedIndex = temp.SignDatas[0].CanDownload; this.Download2.SelectedIndex = temp.SignDatas[1].CanDownload; this.Download3.SelectedIndex = temp.SignDatas[2].CanDownload; this.Download4.SelectedIndex = temp.SignDatas[3].CanDownload; this.Download5.SelectedIndex = temp.SignDatas[4].CanDownload; this.Download6.SelectedIndex = temp.SignDatas[5].CanDownload; this.Download7.SelectedIndex = temp.SignDatas[6].CanDownload; this.Download8.SelectedIndex = temp.SignDatas[7].CanDownload; this.Download9.SelectedIndex = temp.SignDatas[8].CanDownload; this.Download10.SelectedIndex = temp.SignDatas[9].CanDownload; } catch { MessageBox.Show("加载数据失败!"); Logging.AddLog("修改模板时加载模板信息失败!"); // 重启应用程序 if (MessageBox.Show("好吧,我们的程序出现点问题需要重新启动\n点击\"确定\"重启\n点击\"取消\"退出程序?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { Application.Restart(); } else { Application.Exit(); } } }