Exemplo n.º 1
0
        private void cmdExit_Click(object sender, EventArgs e)
        {
            BaseForm tempForm1 = (BaseForm)this.ParentForm;

            PublicClass.ClearEvents(tempForm1);
            Application.Exit();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //重新登录
            BaseForm tempForm = (BaseForm)this.ParentForm;

            PublicClass.ClearEvents(tempForm);
            Application.Restart();
        }
Exemplo n.º 3
0
 private void txtTm_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     if (string.IsNullOrWhiteSpace(txtTm.Text.Trim()))
     {
         return;
     }
     if (txtTm.Text.Trim().Contains("EXIT"))
     {
         BaseForm tempForm1 = (BaseForm)this.ParentForm;
         PublicClass.ClearEvents(tempForm1);
         Application.Exit();
     }
 }
Exemplo n.º 4
0
        private void txtLsh_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != 13)
            {
                return;
            }
            if (string.IsNullOrWhiteSpace(txtLsh.Text))
            {
                return;
            }
            GetFocused(txtLsh);
            string ThisInput = txtLsh.Text.Trim().ToUpper();

            if (ThisInput.StartsWith("$")) //单独指令
            {
                switch (ThisInput)
                {
                case "$QUIT":     //关闭计算机
                    Process.Start("shutdown.exe", "-s -t 10");
                    break;

                case "$EXIT":    //退出程序
                    BaseForm tempForm1 = (BaseForm)this.ParentForm;
                    PublicClass.ClearEvents(tempForm1);
                    Application.Exit();
                    break;

                case "$CANC":    //重新登录
                    //三漏数据处理 每次处理上一个流水号  退出时处理当前
                    BaseForm tempForm = (BaseForm)this.ParentForm;
                    PublicClass.ClearEvents(tempForm);
                    Application.Restart();
                    break;
                }
            }
            TheSn   = ThisInput;
            product = ProductInfoFactory.GetByCompanyCodeSNSingle(CompanyCode, TheSn);//获取sn信息
            if (product == null)
            {
                MessageBox.Show("非法流水号", "提示");
                txtLsh.Text = "";
                GetFocused(txtLsh);
                return;
            }
            txtSo.Text     = product.PLAN_SO;
            txtJx.Text     = product.PRODUCT_MODEL;
            txtUnitNo.Text = product.UNITNO;
            TheFdjxl       = product.PRODUCT_SERIES;
            ThePlancode    = product.PLAN_CODE;
            TheSo          = txtSo.Text;
            TheJx          = txtJx.Text;
            thePlinecode   = product.PLINE_CODE;
            string    sql = "select item_code from data_plan_standard_bom where plan_code='" + ThePlancode + "' and item_name='电控模块' and process_code!='90015'  and rownum=1 ";
            DataTable dt  = dataConn.GetTable(sql);

            if (dt.Rows.Count > 0)
            {
                txtEcm.Text = dt.Rows[0][0].ToString();
            }
            else
            {
                txtEcm.Text = "*";
            }
            GetFocused(txtLsh);
        }
Exemplo n.º 5
0
        private void txtoaso_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != 13)
            {
                return;
            }
            if (string.IsNullOrWhiteSpace(txtoaso.Text))
            {
                return;
            }
            string thisinput = "";

            thisinput = txtoaso.Text.Trim().ToUpper();
            if (thisinput.StartsWith("$")) //单独指令
            {
                switch (thisinput)
                {
                case "$QUIT":     //关闭计算机
                    Process.Start("shutdown.exe", "-s -t 10");
                    break;

                case "$EXIT":    //退出程序
                    BaseForm tempForm1 = (BaseForm)this.ParentForm;
                    PublicClass.ClearEvents(tempForm1);
                    Application.Exit();
                    break;

                case "$CANC":    //重新登录
                    BaseForm tempForm = (BaseForm)this.ParentForm;
                    PublicClass.ClearEvents(tempForm);
                    Application.Restart();
                    break;

                case "$LJQD":    //显示零件清单
                    break;

                case "$CZTS":    //显示装机提示
                    break;

                case "$JHCX":    //显示前后30天计划信息,双击查对应bom
                    break;

                case "$LJDCL":    //录入线边待处理零件信息frmMs003
                    break;

                case "$LJGYS":    //录入零件供应商信息frmMs001
                    break;

                case "$LJQL":    //录入缺料信息frmZlbj
                    break;

                case "$LSYL":    //录入现场临时要料信息frmMs002
                    break;

                case "$QXJL":    //显示返修质量记录frmQxInput
                    break;

                case "$SBGZ":    //录入设备故障frmZlbj
                    break;

                case "$SKIP":    //物料核减控制frmMs004
                    break;

                case "$ZDTPTS":    //查看装机图片FrmShowPic
                    break;

                case "$ZLBG":    //录入质量缺陷frmZlbj
                    break;

                case "$ZPZYZDS":    //查看工艺文件frmGywjSel
                    break;

                case "$ZPJL":    //显示、录入装配记录frmZpjlInput
                    break;

                case "$BHGP":    //处理不合格品
                    break;

                case "$CXGL":    //VEPS重新灌录
                    CsGlobalClass.NEEDVEPS = true;
                    //arg.MessageHead = "VEPS";
                    //arg.MessageBody = "";
                    //SendDataChangeMessage(arg);
                    break;
                }
            }
            refreash();
        }