using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using QMAPP.FJC.Entity.Operation; using QMAPP.Entity; using QMAPP.ServicesAgent; using QMAPP.MD.Entity; using QMAPP.FJC.Entity.Basic; using QMAPP.WinForm.Common; using QMAPP.FJC.Entity; using QMAPP.FJC.Entity.BZD; using QMAPP.WinForm.Forms.Injection; namespace QMAPP.WinForm.Forms.Injection { /// /// /// public partial class InjectionMoldingPasswordForm : Form { //获取服务代理 QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); private InjectionMoldingNEWEditForm _parentForm; private string _msg = string.Empty; /// /// /// /// public InjectionMoldingPasswordForm(string Msg) { InitializeComponent(); infolabel.Text = ""; infolabel.ForeColor = Color.Red; _msg = Msg; } #region 打印按钮 /// /// 打印按钮 /// /// /// private void button1_Click(object sender, EventArgs e) { try { string MakeUpBZD = ""; DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "MakeUpInjection"); if (dataTable.Rows.Count > 0) { MakeUpBZD = dataTable.Rows[0]["Value"].ToString(); } if (string.IsNullOrEmpty(MakeUpBZD)) MakeUpBZD = "admin"; if (string.IsNullOrEmpty(txtMainCode.Text)) { infolabel.Text = "请输入密码!"; this.Show(); } if (txtMainCode.Text == MakeUpBZD) { this.DialogResult = DialogResult.OK; this.Close(); } else { infolabel.Text = "密码输入错误!"; this.Show(); } } catch (Exception exception) { //MessageBox.Show("打印失败!"); throw; } } #endregion private void InjectionMoldingPasswordForm_Load(object sender, EventArgs e) { this.label1.Text = _msg; } } }