Beispiel #1
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblItemIDEdit, txtItemCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblOrgEdit, DropDownListOrg, 8, true));
            manager.Add(new NumberCheck(this.lblQty, this.txtQTY, 0, 9999999999999, true));
            //if (this.txtQTY.Text.Trim().Length > 0)
            //{
            //    manager.Add(new NumberCheck(this.lblQty, this.txtQTY, 0, 9999999999999, false));
            //}

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (!checkItemCode())
            {
                WebInfoPublish.Publish(this, "$Error_CS_No_OPBOMDetail", languageComponent1);
                txtItemCodeEdit.Focus();
                return(false);
            }


            return(true);
        }
        private bool ValidInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new NumberCheck(this.lblConfirmCompleteQtyEdit, this.txtConfirmQtyEdit, 1,
                                        Convert.ToInt32(decimal.Parse(this.txtCompleteQtyQuery.Text) - decimal.Parse(this.txtCompleteQtyConfirmedQuery.Text)), true));
            manager.Add(new NumberCheck(this.lblConfirmScrapQtyEdit, this.txtConfirmScrapQtyEdit, 0,
                                        Convert.ToInt32(decimal.Parse(this.txtScrapQtyQuery.Text) - decimal.Parse(this.txtScrapQtyConfirmedQuery.Text)), true));

            if (this.txtManHourEdit.Text.Trim().Length > 0)
            {
                manager.Add(new NumberCheck(this.lblManHourEdit, this.txtManHourEdit, false));
            }
            if (this.txtMachineHourEdit.Text.Trim().Length > 0)
            {
                manager.Add(new NumberCheck(this.lblMachineHourEdit, this.txtMachineHourEdit, false));
            }

            manager.Add(new DateCheck(this.lblConfirmDateEdit, this.dateConfirmDateEdit.Text, false));

            manager.Add(new LengthCheck(this.lblMOLocationEdit, this.txtMOLocationEdit, 40, true));
            manager.Add(new LengthCheck(this.lblGradeEdit, this.txtGradeEdit, 10, false));


            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblFeederCodeEdit, txtFeederCodeEdit, 40, true));
            manager.Add(new DecimalCheck(lblMaxCountEdit, txtMaxCountEdit, 0, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(lblAlertCountEdit, txtAlertCountEdit, 0, decimal.MaxValue, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            if (Convert.ToDecimal(this.txtAlertCountEdit.Text) > Convert.ToDecimal(this.txtMaxCountEdit.Text))
            {
                WebInfoPublish.Publish(this, "$Feeder_AlertCount_Greater_Than_MaxCount", this.languageComponent1);
                return(false);
            }


            //Add by terry 2010-11-03
            if (Convert.ToDecimal(this.TxtAlterMDAYEdit.Text) > Convert.ToDecimal(this.TxtMaxMDayEdit.Text))
            {
                WebInfoPublish.Publish(this, "$Feeder_AlterMDay_Greater_Than_MaxMDay", this.languageComponent1);
                return(false);
            }

            return(true);
        }
Beispiel #4
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblAPIDEdit, txtAPIDEdit, 40, true));
            manager.Add(new LengthCheck(lblBPCodeEdit, txtBPCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblVersionEdit, txtVersionEdit, 40, true));
            manager.Add(new LengthCheck(lblItemCodeEdit, txtItemEdit, int.MaxValue, true));
            manager.Add(new DecimalCheck(lblThicknessEdit, txtThicknessEdit, 0.00001M, decimal.MaxValue, true));
            manager.Add(new LengthCheck(lblManSNEdit, txtManSNEdit, 40, false));

            manager.Add(new NumberCheck(lblLBRateEdit, txtLBRateEdit, 1, int.MaxValue, true));

            //			manager.Add( new NumberCheck(lblInFacDate, txtInFacDate, 1, int.MaxValue, true) );
            //			manager.Add( new NumberCheck(lblInFacTime, txtInFaTime, 1, int.MaxValue, true) );

            manager.Add(new DecimalCheck(lblTenAEdit, txtTenAEdit, 0.00001M, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(lblTenBEdit, txtTenBEdit, 0.00001M, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(lblTenCEdit, txtTenCEdit, 0.00001M, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(lblTenDEdit, txtTenDEdit, 0.00001M, decimal.MaxValue, true));
            manager.Add(new DecimalCheck(lblTenEEdit, txtTenEEdit, 0.00001M, decimal.MaxValue, true));

            manager.Add(new LengthCheck(lblMemoEdit, txtMemoEdit, 100, false));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();
//			manager.Add( new LengthCheck(lblItem2CartonCFGCodeEdit, txtItem2CartonCFGCodeEdit, 40, true) );
//			manager.Add( new DateCheck(lblPlanShipDateEdit, txtPlanShipDateEdit.Text, true) );
            object objItem = null;

            object[] objItems = null;
            try
            {
                if (itemFacade == null)
                {
                    itemFacade = new FacadeFactory(base.DataProvider).CreateItemFacade();
                }
                objItems = itemFacade.QueryItem(null, txtItemName.Text.Trim().ToUpper(), null, null, null);
            }
            catch
            {}
            if (objItems == null || (objItems != null && objItems.Length < 1))
            {
                WebInfoPublish.Publish(this, "$Error_ItemCode_NotExist", languageComponent1);
                return(false);
            }
            if (txtItemName.Text.Trim() == String.Empty)
            {
                WebInfoPublish.Publish(this, "$PageControl_ItemName $Error_Input_Empty", languageComponent1);
                return(false);
            }
            if (txtMPlate.Text.Trim() == String.Empty)
            {
                WebInfoPublish.Publish(this, "$PageControl_Mplate $Error_Input_Empty", languageComponent1);
                return(false);
            }
            if (txtCartonItemCode.Text.Trim() == String.Empty)
            {
                WebInfoPublish.Publish(this, "$PageControl_CartonItemCode $Error_Input_Empty", languageComponent1);
                return(false);
            }

            if (drpPCSType.SelectedIndex == 1)
            {
                if (txtSPlate.Text.Trim() == String.Empty)
                {
                    WebInfoPublish.Publish(this, "$PageControl_Splate $Error_Input_Empty", languageComponent1);
                    return(false);
                }
            }

            manager.Add(new NumberCheck(lblCartonCodeLen, txtCartonCodeLen, true));
            manager.Add(new NumberCheck(lblStartPosition, txtStartPosition, true));
            manager.Add(new NumberCheck(lblEndPosition, txtEndPosition, true));
            manager.Add(new DecimalRangeCheck(lblStartPosition, txtStartPosition.Text, lblEndPosition, txtEndPosition.Text, false));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #6
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            if (chkSNLength.Checked)
            {
                manager.Add(new NumberCheck(this.lblSNLength, this.txtSNLength, 1, 99999999, false));
            }

            manager.Add(new LengthCheck(this.lblControlTypeEdit, this.ddlControlTypeEdit, 40, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }

            if (this.chkCompareItem.Checked == true)
            {
                if (!this.chkParseBarcode.Checked && !this.chkParsePrepare.Checked && !this.chkParseProduct.Checked)
                {
                    WebInfoPublish.Publish(this, "$CheckCompareItem_Must_CheckOneParse", languageComponent1);
                    return(false);
                }
            }

            return(true);
        }
Beispiel #7
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblPEQPIDEdit, this.txtEQPIDEdit, 40, true));
            manager.Add(new LengthCheck(this.lblResourceCodeEdit, this.txtOpCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblSSQuery, this.drpStepSequenceCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblEQPWorkingTimeEdit, this.txtEQPWorkingTimeEdit, 8, true));


            try
            {
                if (this.txtEQPWorkingTimeEdit.Text.Trim() != string.Empty)
                {
                    int.Parse(this.txtEQPWorkingTimeEdit.Text.Trim());
                }
            }
            catch
            {
                manager.Add(new NumberCheck(this.lblEQPWorkingTimeEdit, this.txtEQPWorkingTimeEdit, 0, 99999999, true));
            }
            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            return(true);
        }
Beispiel #8
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblModelCodeEdit, txtModelCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblOrgEdit, DropDownListOrg, 8, true));

            if (this.chbIsDataLink.Checked)
            {
                manager.Add(new NumberCheck(this.chbIsDataLink, this.txtDataLinkQty, 0, int.MaxValue, true));
            }

            if (this.chbIsDim.Checked)
            {
                manager.Add(new NumberCheck(this.chbIsDim, this.txtDimQty, 0, int.MaxValue, true));
            }


            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #9
0
        protected bool ValidateInput()
        {
            string ie = BenQGuru.eMES.Web.Helper.MessageCenter.ParserMessage("$Error_Input_Empty", this.languageComponent1);

            if (this.chbMailNotify.Checked)
            {
                if (this.lstUser.Items.Count == 0)
                {
                    WebInfoPublish.Publish(this, this.lblReceiver.Text + " " + ie, this.languageComponent1);
                    return(false);
                }
            }

            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblAlertMsg, this.txtAlertMsg, 1000, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// 新增和保存等共用的编辑区域所填数据的检查
        /// </summary>
        /// <returns>是否检查通过</returns>
        protected override bool ValidateInput()
        {
            #region 使用工具类提供的检查
            PageCheckManager manager = new PageCheckManager();
            manager.Add(new LengthCheck(lblItemCode, txtItemCode, 40, true));
            manager.Add(new LengthCheck(lblLotPrefix, txtSNPrefix, 40, true));
            manager.Add(new LengthCheck(lblLotLength, txtSNLength, 6, true));
            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            #endregion

            #region 自定义的检查
            if ((this.txtSNLength.Text.Trim().Length == 0 || Int32.Parse(this.txtSNLength.Text.Trim()) == 0) &&
                this.txtSNPrefix.Text.Trim().Length == 0)
            {
                WebInfoPublish.Publish(this, "$LotLengthAndLotPrefix_Must_Input_One", this.languageComponent1);
                return(false);
            }

            if (this.txtSNLength.Text.Trim().Length > 0 &&
                Int32.Parse(this.txtSNLength.Text.Trim()) > 0 &&
                this.txtSNPrefix.Text.Trim().Length > 0 &&
                this.txtSNPrefix.Text.Trim().Length >= int.Parse(this.txtSNLength.Text.Trim()))
            {
                WebInfoPublish.Publish(this, "$Error_LotLengthTooShort", this.languageComponent1);
                return(false);
            }
            #endregion

            return(true);
        }
Beispiel #11
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblMaterialBusinessCodeEdit, this.txtMaterialBusinessCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblMaterialBusinessDescEdit, this.txtMaterialBusinessDescEdit, 100, true));
            manager.Add(new LengthCheck(this.lblOrgEdit, this.drpOrgEdit, 40, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            if (this.txtMaterialBusinessCodeEdit.ReadOnly == false)
            {
                //当是新增状态
                object obj = this.WarehouseFacade.GetMaterialBusiness(this.txtMaterialBusinessCodeEdit.Text.Trim().ToUpper());
                if (obj != null)
                {
                    WebInfoPublish.Publish(this, "$Error_Primary_Key_Overlap", this.languageComponent1);
                    return(false);
                }
            }
            return(true);
        }
        /// <summary>
        /// 分页获得查询的数据
        /// </summary>
        /// <param name="inclusive">最小</param>
        /// <param name="exclusive">最大</param>
        /// <returns>object[]</returns>
        protected override object[] LoadDataSource(int inclusive, int exclusive)
        {
            #region 查询栏位检查
            if (this.txtSNLengthQuery.Text.Trim().Length > 0)
            {
                PageCheckManager manager = new PageCheckManager();

                manager.Add(new NumberCheck(lblLotLengthQuery, txtSNLengthQuery, 0, 40, false));

                if (!manager.Check())
                {
                    WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                    return(null);
                }
            }
            #endregion

            if (m_ItemLotFacade == null)
            {
                m_ItemLotFacade = new ItemLotFacade(this.DataProvider);
            }
            return(this.m_ItemLotFacade.QueryItem2LotCheck(
                       FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)),
                       FormatHelper.CleanString(this.txtItemDescQuery.Text),
                       FormatHelper.CleanString(this.drpItemTypeQuery.SelectedValue.ToString()),
                       FormatHelper.CleanString(this.drpExportImportQuery.SelectedValue.ToString()),
                       FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSNPrefixQuery.Text)),
                       FormatHelper.CleanString(this.txtSNLengthQuery.Text),
                       inclusive, exclusive));
        }
Beispiel #13
0
        protected override bool ValidateInput()
        {
            if (this.IsByMOControl() && (this.txtMOCodeEdit.Text.Trim() == string.Empty))
            {
                WebInfoPublish.Publish(this, "$Error_Input_IsByMOControl_Empty", this.languageComponent1);
                return(false);
            }

            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblTransNameEdit, txtTransCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblRefCodeEdit, txtRefCodeEdit, 40, false));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            if (!ValidateInput2())
            {
                WebInfoPublish.Publish(this, "$Error_Input_Empty", this.languageComponent1);
                return(false);
            }
            if (this.txtMOCodeEdit.Text.Trim() != string.Empty)
            {
                if (JudgeMoByCode(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOCodeEdit.Text))) == false)
                {
                    WebInfoPublish.Publish(this, "$Error_Input_MoCode", this.languageComponent1);
                    return(false);
                }
            }


            return(true);
        }
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblOPBOMItemSeqEdit, TextboxOPBOMItemSeqEdit, 8, true));
            manager.Add(new LengthCheck(lblBOMItemCodeEdit, txtItemCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblSourceItemCode, txtSourceItemCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblItemControlTypeEdit, drpItemControlTypeEdit, 40, true));
            manager.Add(new LengthCheck(lblItemUOMEdit, txtBOMItemUOMEdit, 40, true));
            manager.Add(new DecimalCheck(lblItemQtyEdit, txtItemQtyEdit, 0, int.MaxValue, true));
            if (chkSNLength.Checked)
            {
                manager.Add(new NumberCheck(this.lblSNLength, this.txtSNLength, 1, 99999999, false));
            }

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }

            if (this.chkCompareItem.Checked == true)
            {
                if (!this.chkParseBarcode.Checked && !this.chkParsePrepare.Checked && !this.chkParseProduct.Checked)
                {
                    WebInfoPublish.Publish(this, "$CheckCompareItem_Must_CheckOneParse", languageComponent1);
                    return(false);
                }
            }
            return(true);
        }
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblSupplierCodeEdit, txtSupplierCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblSupplierItemEdit, txtSupplierItemEdit, 40, true));
            manager.Add(new LengthCheck(lblPCBAVersionDescriptionEdit, txtPCBAVersionEdit, 40, true));
            manager.Add(new LengthCheck(lblBIOSVersionDescriptionEdit, txtBIOSVersionEdit, 40, true));
            manager.Add(new LengthCheck(lblCardStartEdit, txtCardStartEdit, 40, true));
            manager.Add(new LengthCheck(lblCardEndEdit, txtCardEndEdit, 40, true));
            manager.Add(new LengthCheck(lblDataCodeStartEdit, txtDataCodeStartEdit, 40, true));
            manager.Add(new LengthCheck(lblDateCodeEndEdit, txtDateCodeEndEdit, 40, true));
            manager.Add(new LengthCheck(lblItemVersion, txtItemVersion, 40, true));
            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
            //manager.Add( new LengthCheck(lblItemVersion, txtItemVersion, 40, true) );

            //			if((this.txtCardStartEdit.Text.Trim().Length != this.txtCardEndEdit.Text.Trim().Length))
            //			{
            //				throw new Exception(ErrorCenter.GetErrorUserDescription( GetType().BaseType, string.Format(ErrorCenter.ERROR_WITHOUTINPUT, "流程卡范围起始和结束必须等长!") ) );
            //			}
            //			if((this.txtDataCodeStartEdit.Text.Trim().Length != this.txtDateCodeEndEdit.Text.Trim().Length))
            //			{
            //				throw new Exception(ErrorCenter.GetErrorUserDescription( GetType().BaseType, string.Format(ErrorCenter.ERROR_WITHOUTINPUT, "生产日期范围起始和结束必须等长!") ) );
            //			}
        }
Beispiel #16
0
        protected void cmdSave_ServerClick(object sender, System.EventArgs e)
        {
            PageCheckManager checkManager = new PageCheckManager();

            checkManager.Add(new LengthCheck(lblOrderStatusEdit, drpOrderStatusEdit, Int32.MaxValue, true));

            if (!checkManager.Check())
            {
                WebInfoPublish.Publish(this, checkManager.CheckMessage, this.languageComponent1);
                return;
            }

            if (orderFacade == null)
            {
                orderFacade = new FacadeFactory(base.DataProvider).CreateOrderFacade();
            }
            object order = this.GetEditObject();

            if (order != null)
            {
                if ((order as Order).OrderStatus == OrderStatus.Completed)
                {
                    ExceptionManager.Raise(this.GetType().BaseType, "$Error_Order_Completed_CANNOT_Update");
                    return;
                }

                this.orderFacade.UpdateOrder(order as Order);;
                this.gridHelper.GridBind(this.pagerToolBar.PageIndex, this.pagerToolBar.PageSize);
                this.RequestData();
                this.buttonHelper.PageActionStatusHandle(PageActionType.Save);
            }
        }
Beispiel #17
0
        protected bool ValidateInput()
        {
            string ie = BenQGuru.eMES.Web.Helper.MessageCenter.ParserMessage("$Error_Input_Empty", this.languageComponent1);

            if (this.chbMailNotify.Checked && this.lstUser.Items.Count == 0)
            {
                WebInfoPublish.Publish(this, this.lblReceiver.Text + " " + ie, this.languageComponent1);
                return(false);
            }
            PageCheckManager manager = new PageCheckManager();

            if (this._alerttype != BenQGuru.eMES.AlertModel.AlertType_Old.First && this._alerttype != BenQGuru.eMES.AlertModel.AlertType_Old.ResourceNG) //如果不是首件上线
            {
                manager.Add(new NumberCheck(this.lblStartNum, this.txtStartNum, 1, int.MaxValue, true));
            }

            if (this.drpOperator.SelectedValue == "BW")
            {
                manager.Add(new DecimalRangeCheck(this.lblAlertCondition, this.txtLow.Text, this.lblAlertCondition, this.txtUp.Text, true));
            }
            else
            {
                manager.Add(new DecimalCheck(this.lblAlertCondition, this.txtLow, true));
            }

            manager.Add(new LengthCheck(this.lblAlertMsg, this.txtAlertMsg, 1000, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            return(true);
        }
Beispiel #18
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblReworkMo, txtReworkSheetCode, 40, true));
            //manager.Add( new LengthCheck(lblDepartment,txtDepartment,40,false)) ;


            manager.Add(new DecimalCheck(lblReworkQty, txtReworkQty, false));
            //manager.Add( new DecimalCheck(lblReworkHC,txtReworkHC,false)) ;

            //manager.Add( new LengthCheck(this.lblItemCode , this.txtItemQuery , 40 , true )) ;
            manager.Add(new LengthCheck(this.lblReworkSourceCode, this.drpReworkSource, 40, true));

//
//            if( this.drpReworkType.SelectedValue == BenQGuru.eMES.Web.Helper.ReworkType.REWORKTYPE_REMO)
//            {
//                manager.Add( new LengthCheck(this.lblMOCode , this.drpMOCode , 40 , true )) ;
//            }

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (string.Compare(this.drpReworkType.SelectedValue, ReworkType.REWORKTYPE_ONLINE, true) == 0)
            {
                if (this.txtItemQuery.Text == string.Empty)
                {
                    WebInfoPublish.Publish(this, this.lblItemCodeQuery.Text + "$Error_Input_Empty", this.languageComponent1);
                    return(false);
                }
            }
            else
            {
                if (this.txtMOQuery.Text == string.Empty)
                {
                    WebInfoPublish.Publish(this, this.lblMOQuery.Text + "$Error_Input_Empty", this.languageComponent1);
                    return(false);
                }
                else
                {
                    object mo = new ReworkFacadeFactory(base.DataProvider).CreateMOFacade().GetMO(this.txtMOQuery.Text.Trim().ToUpper());
                    if (mo != null)
                    {
                        //获得返工工单的计划数量,即为返工数量
                        this.txtReworkQty.Text = ((MO)mo).MOPlanQty.ToString();
                        //根据工单的料品,选择料品
                        this.txtItemQuery.Text = ((MO)mo).ItemCode;
                    }
                }
            }

            manager.Add(new LengthCheck(lblReworkReason, txtReworkReason, 200, false));
            manager.Add(new LengthCheck(lblReasonAnalyse, txtReasonAnalyse, 200, false));
            manager.Add(new LengthCheck(lblSolution, txtSolution, 200, false));

            return(true);
        }
Beispiel #19
0
        private bool _checkRequireFields()
        {
            PageCheckManager manager = new PageCheckManager();

            //manager.Add(new DateRangeCheck(this.lblStartDateQuery,this.dateStartDateQuery.Text,this.lblEndDateQuery,this.dateEndDateQuery.Text,true));
            //manager.Add(new DateRangeCheck(this.lblReceveBegindate,this.txtReceiveBeginDate.Text,this.lblReceveEnddate,this.txtReceiveEndDate.Text,true));
            //manager.Add(new DateRangeCheck(this.lblTSBegindate,this.txtTSBeginDate.Text,this.lblTSEnddate,this.txtTSEndDate.Text,true));


            if (this.rdbErrorDate.Checked)
            {
                manager.Add(new DateRangeCheck(this.lblNGStartDateQuery, this.dateStartDateQuery.Text, this.lblNGEndDateQuery, this.dateEndDateQuery.Text, true));
            }
            if (this.rdbReceivedDate.Checked)
            {
                manager.Add(new DateRangeCheck(this.lblReceiveBeginDate, this.txtReceiveBeginDate.Text, this.lblReceiveEndDate, this.txtReceiveEndDate.Text, true));
            }
            if (this.rdbTSDate.Checked)
            {
                manager.Add(new DateRangeCheck(this.lblRepairStartDateQuery, this.txtTSBeginDate.Text, this.lblRepairEndDateQuery, this.txtTSEndDate.Text, true));
            }

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #20
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblTryCodeEdit, this.txtTryCodeEdit, 40, true));
            if (this.txtPlanQtyEdit.Text.Trim().Length > 0)
            {
                manager.Add(new NumberCheck(this.lblQTYAndLoopEdit, this.txtPlanQtyEdit, 0, 99999999, false));
            }

            manager.Add(new LengthCheck(this.lblVendorNameEdit, this.txtVendorNameEdit, 100, false));
            manager.Add(new LengthCheck(this.lblTryResultEdit, this.txtResultEdit, 200, false));
            manager.Add(new LengthCheck(this.lblMemoEdit, this.txtMemoEdit, 1000, false));
            manager.Add(new LengthCheck(this.lblTryTypeEdit, this.drpTryTypeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblAgingDateEdit, this.txtAgingDateEdit, 40, false));
            manager.Add(new LengthCheck(this.lblSoftWareVersionEdit, this.txtSoftWareVersionEdit, 40, false));
            manager.Add(new LengthCheck(this.lblTryReasonEdit, this.txtTryReasonEdit, 1000, false));


            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (this.txtPlanQtyEdit.Text.Trim().Length > 0 &&
                this.txtActualQty.Text.Trim().Length > 0 &&
                Convert.ToInt32(this.txtPlanQtyEdit.Text.Trim()) < Convert.ToInt32(this.txtActualQty.Text.Trim()))
            {
                WebInfoPublish.Publish(this, "$PlanQty_big_QctualQty", this.languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #21
0
        private bool _checkRequireFields()
        {
            //查询条件-时间范围,是否输入完整
            //  bool isDateComplete = (this.dateStartDateQuery.Text.Trim() == string.Empty) || (this.dateEndDateQuery.Text.Trim() == string.Empty);

            //查询条件-生产工单范围,是否输入完整
            //  bool isMoComplete = (this.txtStartMoQuery.Text.Trim() == string.Empty) || (this.txtEndMoQuery.Text.Trim() == string.Empty);

            //查询条件-销售订单范围,是否输入完整
            //bool isSoComplete = (this.txtStartSoQuery.Text.Trim() == string.Empty) || (this.txtEndSoQuery.Text.Trim() == string.Empty);

            //if (isDateComplete && isMoComplete)
            //{
            //    //时间、生产工单、销售订单,都不完整(至少有一组要是完整的)
            //    WebInfoPublish.PublishInfo(this, "$At_Least_OneGroup_Condition", this.languageComponent1);
            //    return false;
            //}
            PageCheckManager manager = new PageCheckManager();

            //  manager.Add(new DateRangeCheck(this.lblStartDateQuery, this.dateStartDateQuery.Text, this.lblEndDateQuery, this.dateEndDateQuery.Text, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(true);
            }
            return(true);
        }
Beispiel #22
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblOrderNoEd, this.txtOrderNoEdit, 40, true));
            manager.Add(new NumberCheck(this.lblReceiveLineEdit, this.txtReceiveLineEdit, Int32.MinValue, Int32.MaxValue, true));
            manager.Add(new DecimalCheck(this.lblPlanQtyEdit, txtPlanQtyEdit, decimal.MinValue, decimal.MaxValue, true));
            manager.Add(new NumberCheck(this.lblOrderLineEdit, txtOrderLineEdit, Int32.MinValue, Int32.MaxValue, true));
            manager.Add(new LengthCheck(this.lblMaterialCodeEdit, this.txtMaterialCodeEdit, 40, true));


            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            if (_iqcfacade == null)
            {
                _iqcfacade = new BenQGuru.eMES.IQC.IQCFacade(base.DataProvider);
            }
            object objAsn = _iqcfacade.GetASN(this.txtReceiveNoQuery.Text);

            if (objAsn != null)
            {
                WebInfoPublish.Publish(this, "$BS_ReNo_Create_ANSNO $InvReceiptNO:" + this.txtReceiveNoQuery.Text, this.languageComponent1);
                return(false);
            }

            return(true);
        }
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new DateRangeCheck(this.lblStockDateFromQuery, this.dateStockDateFromQuery.Text, this.dateStockDateToQuery.Text, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return;
            }

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            object[] dataSource = facadeFactory.CreateQueryStockFacade().QueryStockContrast(
                this.rdbStockStatusQuery.SelectedIndex,
                FormatHelper.TODateInt(this.dateStockDateFromQuery.Text),
                FormatHelper.TODateInt(this.dateStockDateToQuery.Text),
                (e as WebQueryEventArgs).StartRow,
                (e as WebQueryEventArgs).EndRow);

            (e as WebQueryEventArgs).GridDataSource = dataSource;

            (e as WebQueryEventArgs).RowCount =
                facadeFactory.CreateQueryStockFacade().QueryStockContrastCount(
                    this.rdbStockStatusQuery.SelectedIndex,
                    FormatHelper.TODateInt(this.dateStockDateFromQuery.Text),
                    FormatHelper.TODateInt(this.dateStockDateToQuery.Text));
        }
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblCheckListCodeEdit, txtCheckListCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblCheckItemDesc, txtCheckItemDesc, 100, false));
            manager.Add(new LengthCheck(lblCheckValueMin, txtCheckValueMin, 40, false));
            if (txtCheckValueMin.Text != string.Empty)
            {
                manager.Add(new DecimalCheck(lblCheckValueMin, txtCheckValueMin, Convert.ToDecimal("-9999999999.999999"), Convert.ToDecimal("9999999999.999999"), false));
            }
            manager.Add(new LengthCheck(lblCheckValueMax, txtCheckValueMax, 40, false));
            if (txtCheckValueMax.Text != string.Empty)
            {
                manager.Add(new DecimalCheck(lblCheckValueMax, txtCheckValueMax, Convert.ToDecimal("-9999999999.999999"), Convert.ToDecimal("9999999999.999999"), false));
            }
            manager.Add(new LengthCheck(lblUnit, txtUnit, 40, false));
            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            return(true);
        }
Beispiel #25
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblShiftCodeEdit, txtShiftCodeEdit, 40, true));
            manager.Add(new NumberCheck(lblShiftSequenceEdit, txtShiftSequenceEdit, true));
            manager.Add(new LengthCheck(lblShiftTypeCodeEdit, drpShiftTypeCodeEdit, 40, true));
            manager.Add(new LengthCheck(lblShiftDescriptionEdit, txtShiftDescriptionEdit, 100, false));

            //			if ( !this.chbIsOverDateEdit.Checked )
            //			{
            //				manager.Add( new TimeRangeCheck(this.lblShiftBeginTimeEdit, this.timeShiftBeginTimeEdit.Text, this.lblShiftEndTimeEdit, this.timeShiftEndTimeEdit.Text, true) );
            //			}
            //			else
            //			{
            //				manager.Add( new TimeRangeCheck(this.lblShiftEndTimeEdit, this.timeShiftEndTimeEdit.Text, this.lblShiftBeginTimeEdit, this.timeShiftBeginTimeEdit.Text, true) );
            //			}

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #26
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();



            manager.Add(new LengthCheck(this.lblIQCNoEdit, this.txtIQCNoEdit, 50, true));
            manager.Add(new LengthCheck(this.lblASNNoEdit, this.txtASNNoEdit, 40, true));
            manager.Add(new LengthCheck(this.lblVendorCodeEdit, this.txtVendorCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblVendorNameEdit, this.txtVendorNameEdit, 100, true));
            manager.Add(new LengthCheck(this.lblInvUserEdit, this.txtInvUserEdit, 100, true));
            manager.Add(new LengthCheck(this.lblApplicantEdit, this.txtApplicantEdit, 100, false));
            manager.Add(new LengthCheck(this.lblInspectorEdit, this.txtInspectorEdit, 100, false));
            manager.Add(new LengthCheck(this.lblLotNoEdit, this.txtLotNoEdit, 100, false));
            manager.Add(new LengthCheck(this.lblStandardEdit, this.txtStandardEdit, 100, false));
            manager.Add(new LengthCheck(this.lblMethodEdit, this.txtMethodEdit, 100, false));
            manager.Add(new LengthCheck(this.lblPICEdit, this.txtPICEdit, 100, false));

            ////			manager.Add( new LengthCheck(this.lblResourceTypeEdit, this.drpResourceTypeEdit, 40, true) );
            ////			manager.Add( new LengthCheck(this.lblResourceGroupEdit, this.drpResourceGroupEdit, 40, true) );
            ////			manager.Add( new LengthCheck(this.lblStepSequenceCodeEdit, this.drpStepSequenceCodeEdit, 40, true) );
            ////			manager.Add( new LengthCheck(this.lblSegmentCodeEdit, this.txtSegmentCodeEdit, 40, true) );
            //manager.Add(new LengthCheck(this.lblResourceDescriptionEdit, this.txtResourceDescriptionEdit, 100, false));
            //manager.Add(new LengthCheck(this.lblOrgIDEdit, this.DropDownListOrg, 8, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            return(true);
        }
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblNGCodeEdit, this.txtErrorCode, 65535, true));
            manager.Add(new LengthCheck(this.lblReworkOPCodeEdit, this.txtReworkOPCode, 40, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            if (this.txtReworkRoute.Text.Trim().Length != 0)
            {
                BenQGuru.eMES.BaseSetting.BaseModelFacade baseModelFacade = new BenQGuru.eMES.BaseSetting.BaseModelFacade(this.DataProvider);
                object route2op = baseModelFacade.GetRoute2Operation(this.txtReworkRoute.Text.ToUpper(), this.txtReworkOPCode.Text.ToUpper());
                if (route2op == null)
                {
                    WebInfoPublish.Publish(this, "$Error_RouteHasNoOperations", this.languageComponent1);
                    return(false);
                }
            }

            return(true);
        }
Beispiel #28
0
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblItemCodeEdit, this.txtItemCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblOrderNoEdit, this.txtOrderNoEdit, 40, false));
            //manager.Add(new LengthCheck(this.lblItemGradeEdit, this.drpItemGradeEdit, 40, false));
            manager.Add(new LengthCheck(this.lblStorageTypeEdit, this.drpStorageCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblDNQuantityEdit, this.txtDNQuantityEdit, 13, true));
            manager.Add(new LengthCheck(this.lblMOCodeEdit, this.txtMOCodeEdit, 40, false));
            manager.Add(new LengthCheck(this.lblReworkMOEdit, this.txtReworkMOEdit, 40, false));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                return(false);
            }

            int dnQuantity = int.Parse(this.txtDNQuantityEdit.Text);

            if (this.txtRealQuantity.Text != null && this.txtRealQuantity.Text.Length > 0)
            {
                int dnRealQuantity = int.Parse(this.txtRealQuantity.Text);

                if (dnQuantity < dnRealQuantity)
                {
                    WebInfoPublish.Publish(this, "$Plan_Must_Length_Than_Real", this.languageComponent1);
                    return(false);
                }
            }

            return(true);
        }
Beispiel #29
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblItemCodeEdit, txtItemCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblItemUOMEdit, txtItemUOMEdit, 40, true));
            manager.Add(new LengthCheck(lblItemTypeEdit, drpItemTypeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblItemModelCodeEdit, this.drpModelEdit, 40, true));
            //manager.Add( new NumberCheck (this.lblVolumnNumEdit, this.txtVolumnEdit, 0, int.MaxValue, false) );
            manager.Add(new NumberCheck(this.lblItemCartonQty, this.txtCartonQty, 0, int.MaxValue, false));
            manager.Add(new NumberCheck(this.lblLotSizeEdit, this.txtLotSizeEdit, 0, int.MaxValue, false));
            manager.Add(new LengthCheck(this.lblOrgEdit, this.DropDownListOrg, 8, true));
            manager.Add(new LengthCheck(this.lblItemProductCodeEdit, this.TextboxItemProductCodeEdit, 100, false));
            manager.Add(new NumberCheck(this.lblBurnUseMinutesEdit, this.txtBurnUseMinutesEdit, 0, int.MaxValue, false));

            //manager.Add( new DecimalCheck(this.lblMaxElectricCurrent, this.txtMaxElectricCurrent, decimal.MinValue, decimal.MaxValue, false) );
            //manager.Add( new DecimalCheck (this.lblMinElectricCurrent, this.txtMinElectricCurrent, decimal.MinValue, decimal.MaxValue, false) );

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
        public LabResultPatternsTestUser GetTestUser
        (
            SqliteConnection deviceConnection,
            SqliteConnection modelConnection
        )
        {
            // Funcs<DbContext> for appModel and pageCheckManager
            PropertyContext GetDeviceContext()
            {
                return(GetPropertyContext(deviceConnection));
            }

            PropertyContext GetModelContext()
            {
                return(GetPropertyContext(modelConnection));
            }

            // create the AppModel
            var appModel = new LabPatternResultsAppModel(GetModelContext);

            // create the TestDevice
            var testDevice = new LabPatternResultsTestDevice();

            // create the PageChecker
            var pageCheckManager = new PageCheckManager(GetDeviceContext, GetModelContext);

            return(new LabResultPatternsTestUser(appModel, testDevice, pageCheckManager));
        }