Beispiel #1
0
        private void InitForm()
        {
            object[] errorCodeGroups = tsFacade.GetErrorCodeGroupByItemCode(ItemCode);
            if (errorCodeGroups != null)
            {
                errorCodeSelect.ClearErrorGroup();
                errorCodeSelect.ClearSelectedErrorCode();
                errorCodeSelect.ClearSelectErrorCode();
                errorCodeSelect.AddErrorGroups(errorCodeGroups);
            }

            if (this.SelectedErrorCode != null)
            {
                this.errorCodeSelect.AddSelectedErrorCodes(this.SelectedErrorCode);
            }
        }
Beispiel #2
0
        private void txtRunningCard_TxtboxKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                //Laws Lu,2005/08/12,修改 产品序列号不能为空值
                if (txtRunningCard.Value.Trim() == string.Empty)
                {
                    ApplicationRun.GetInfoForm().Add("$CS_Please_Input_RunningCard");

                    //将焦点移到产品序列号输入框
                    txtRunningCard.TextFocus(false, true);
                    System.Windows.Forms.SendKeys.Send("+{TAB}");
                }
                else
                {
                    errorCodeSelect.ClearErrorGroup();
                    errorCodeSelect.ClearSelectedErrorCode();
                    errorCodeSelect.ClearSelectErrorCode();


                    ApplicationRun.GetInfoForm().Add(CheckProduct());

                    //Laws Lu,2006/06/21 set focus to error code
                    errorCodeSelect.ErrorInpuTextBox.Text = String.Empty;
                    errorCodeSelect.ErrorInpuTextBox.Focus();

//					//Laws Lu,2005/08/12,新增设置焦点
//
//					txtRunningCard.TextFocus(false, true);
                    SendKeys.Send("+{TAB}");
                }
            }
            else
            {
                btnSave.Enabled = false;
            }
        }