private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblDQMaterialNO, txtDQMaterialNO, 40, true));
            //  manager.Add(new LengthCheck(lblOrgEdit, drpOrgEdit, 2000, true));
            manager.Add(new LengthCheck(lblVendorCodeEdit, txtVendorCodeEdit, 40, true));
            manager.Add(new DateCheck(lblEffectDateEdit, datEffectDateEdit.Text, false));
            manager.Add(new DateCheck(lblInvalidDateEdit, datInvalidDateEdit.Text, false));
            manager.Add(new DateRangeCheck(this.lblEffectDateEdit, this.datEffectDateEdit.Text, this.lblInvalidDateEdit, this.datInvalidDateEdit.Text, true));

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

            ItemFacade itemFacade = new ItemFacade(this.DataProvider);

            //if (itemFacade.GetMaterial(
            //    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtMaterialCodeEdit.Text)),
            //    int.Parse(drpOrgEdit.SelectedValue)) == null)

            BenQGuru.eMES.Material.WarehouseFacade _WarehouseFacade = new BenQGuru.eMES.Material.WarehouseFacade(base.DataProvider);
            if (_WarehouseFacade.GetMaterialInfoByQDMCode(
                    FormatHelper.PKCapitalFormat(FormatHelper.CleanString(txtDQMaterialNO.Text))) == null)
            {
                WebInfoPublish.Publish(this, "$Error_Material_NotFound", languageComponent1);
                return(false);
            }

            if (Convert.ToDateTime(this.datEffectDateEdit.Text) > Convert.ToDateTime(this.datInvalidDateEdit.Text))
            {
                WebInfoPublish.Publish(this, "$Error_EffectDateCannotBiggerThanInvalidDate", languageComponent1);
                return(false);
            }

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

            manager.Add(new LengthCheck(lblFrozenCauseEdit, txtFrozenCauseEdit, 100, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #3
0
        /// <summary>
        /// 输入检查
        /// </summary>
        /// <returns></returns>
        private bool _checkRequireFields()
        {
            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);
        }
        protected override bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblBusinessCodeEdit, this.txtBusinessCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblBusinessDescriptionEdit, this.txtBusinessDescriptionEdit, 100, true));
            manager.Add(new LengthCheck(this.lblOrgEdit, DropDownListOrg, 8, true));

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

            if (rdoTypeIn.Checked == false && rdoTypeOut.Checked == false)
            {
                WebInfoPublish.Publish(this, "$Must_Chose_One", this.languageComponent1);
                return(false);
            }

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

            manager.Add(new LengthCheck(this.lblTransferNo, this.txtTransferNo, 40, true));
            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }

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

            manager.Add(new NumberCheck(this.lblVolumnEdit, this.txtVolumnEdit, 0, int.MaxValue, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            return(true);
        }
Beispiel #7
0
        protected override bool ValidateInput()
        {
            if (txtMaterialValidity.Text.Trim().Length > 10)
            {
                WebInfoPublish.Publish(this, "$Error_VALID_DAY_NOT_MORE_THREE", this.languageComponent1);
                return(false);
            }
            PageCheckManager manager = new PageCheckManager();

            //manager.Add(new LengthCheck(this.lblMaterialValidity, this.txtMaterialValidity, 3, true));
            manager.Add(new LengthCheck(this.lblMaterialType, this.drpMaterialType, 100, false));
            manager.Add(new NumberCheck(this.lblMaterialValidity, this.txtMaterialValidity, true));

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


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

            manager.Add(new LengthCheck(this.lblTryNo, this.txtTryNoQuery, System.Int32.MaxValue, 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(lblID, this.txtNameEdit, 40, true));

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

            manager.Add(new LengthCheck(this.lblFactoryE, this.drpFactoryCodeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblWeekNoEdit, this.txtWeekNoEdit, 40, true));
            manager.Add(new DecimalCheck(this.lblTotalEdit, this.txtTotalEdit, decimal.MinValue, decimal.MaxValue, false));
            manager.Add(new DecimalCheck(this.lblLRREdit, this.txtLRREdit, decimal.MinValue, decimal.MaxValue, false));

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

            if (_facade == null)
            {
                _facade = new FacadeFactory(base.DataProvider).CreateReportFacade();
            }
            string factoryID = this.drpFactoryCodeEdit.SelectedValue;
            string weekNo    = "";

            if (this.txtWeekNoEdit.Text != "" && this.txtWeekNoEdit.Text.Substring(0, 2).ToUpper() == "WK")
            {
                weekNo = "WK" + this.txtWeekNoEdit.Text.Substring(2);
            }
            else
            {
                weekNo = "WK" + this.txtWeekNoEdit.Text;
            }
            int count = _facade.QueryFactoryWeekCheckCount(factoryID, weekNo);

            if (count != 0 && PageAction == PageActionType.Add)
            {
                WebInfoPublish.Publish(this, factoryID + " $Factory_WeekNo_Exist", this.languageComponent1);
            }

            return(true);
        }
Beispiel #11
0
        //验证资源不良数输入
        private bool ValidateResInput()
        {
            string ie = BenQGuru.eMES.Web.Helper.MessageCenter.ParserMessage("$Error_Input_Empty", this.languageComponent1);

            if (this.lstItem.Items.Count == 0)
            {
                WebInfoPublish.Publish(this, this.lblAlertItem.Text + " " + ie, this.languageComponent1);
                return(false);
            }
            if (this.lstResource.Items.Count == 0)
            {
                WebInfoPublish.Publish(this, this.lblAlertResource.Text + " " + ie, this.languageComponent1);
                return(false);
            }
            if (this.lstErrorCode.Items.Count == 0)
            {
                WebInfoPublish.Publish(this, this.lblNGCodeEdit.Text + " " + ie, this.languageComponent1);
                return(false);
            }

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

            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 #12
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblRMABillCode, txtRMABillEidt, 40, true));

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

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

            manager.Add(new LengthCheck(lblPauseCode, txtPauseCode, 40, true));

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

            manager.Add(new NumberCheck(lblSequenceEdit, txtSequenceEdit, true));

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

            return(true);
        }
Beispiel #15
0
        protected override bool ValidateInput()
        {
            if (_InventoryFacade == null)
            {
                _InventoryFacade = new InventoryFacade(base.DataProvider);
            }

            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(this.lblMaterialNO, this.txtMaterialNO, 40, true));
            manager.Add(new LengthCheck(this.lblSpecialDescEdit, this.txtSpecialDescEdit, 200, true));
            manager.Add(new LengthCheck(this.lblStorageInEdit, this.drpStorageInEdit, 40, true));
            manager.Add(new LengthCheck(this.lblLoationInEdit, this.drpLoationInEdit, 40, true));
            manager.Add(new NumberCheck(this.lblQTY, this.txtQTY, true));

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

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

            manager.Add(new DateCheck(this.lblPromiseTimeEdit, this.timePromiseTimeEdit.Text, false));

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

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

            manager.Add(new LengthCheck(this.lblStorageAttributeEdit, this.ddlStorageAttributeEdit, 40, true));
            manager.Add(new LengthCheck(this.lblPeriodGroupEdit, this.ddlPeriodGroupEdit, 40, true));
            manager.Add(new LengthCheck(this.lblPeriodCodeEdit, this.ddlPeriodCodeEdit, 40, true));
            manager.Add(new DecimalCheck(this.lblIndexValueEdit, this.txtIndexValueEdit, Convert.ToDecimal(0.00), Convert.ToDecimal(1.00), true));

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

            if (!_InventoryFacade.CheckInventoryPeriodStandard(ddlStorageAttributeEdit.SelectedValue, ddlPeriodGroupEdit.SelectedValue, ddlPeriodCodeEdit.SelectedValue, decimal.Parse(txtIndexValueEdit.Text)))
            {
                WebInfoPublish.Publish(this, "$Error_CheckInventoryPeriodStandard", this.languageComponent1);
                return(false);
            }

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

            manager.Add(new LengthCheck(lblApproveContentEdit, txtApproveContentEdit, 40, 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 DecimalCheck(this.lblRationNumberEdit, this.txtRationNumberEdit, 0, Convert.ToDecimal(99999999.99), true));

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

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

            manager.Add(new DateRangeCheck(this.lblOQCBegindate, this.txtOQCBeginDate.Text, this.txtOQCEndDate.Text, false));

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

            this.QueryEvent(sender, e);
        }
Beispiel #21
0
        protected override void cmdQuery_Click(object sender, EventArgs e)
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new DateCheck(this.lblPlanDateFromto, this.dateVoucherDateFrom.Text, true));

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

            base.cmdQuery_Click(sender, e);
        }
Beispiel #22
0
        private bool ValidateInput()
        {
            PageCheckManager manager = new PageCheckManager();

            manager.Add(new LengthCheck(lblAlertMailRecipients, txtAlertMailRecipients, 2000, true));

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

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

            manager.Add(new LengthCheck(this.lblSegment, this.drpSegmentQuery, 40, true));
            manager.Add(new LengthCheck(this.lblShip, this.drpShiftQuery, 40, true));

            if (this.eMESDate1.Text.Length != 0)
            {
                manager.Add(new DateCheck(this.lblDate, this.eMESDate1.Text, true));
                if (!manager.Check())
                {
                    WebInfoPublish.Publish(this, manager.CheckMessage, this.languageComponent1);
                    return(false);
                }
                else
                {
                    manager.Add(new DateRangeCheck(this.lblDate, this.eMESDate1.Text, this.lblToday, FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now)), 0, ConfigSection.Current.DomainSetting.MaxDateRange, true));
                }
            }
            else
            {
                manager.Add(new DateRangeCheck(this.lblDate, this.eMESDate1.Text, this.lblToday, FormatHelper.ToDateString(FormatHelper.TODateInt(System.DateTime.Now)), 0, ConfigSection.Current.DomainSetting.MaxDateRange, true));
            }


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

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

            manager.Add(new LengthCheck(this.lblPEQPIDEdit, this.txtEQPIDEdit, 40, true));
            manager.Add(new NumberCheck(this.lblSTOPDurationEdit, this.txtSTOPDurationEdit, 0, 999999, true));

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

            if (this.txtDateUseEdit.Text.Trim().Length <= 0)
            {
                WebInfoPublish.Publish(this, "$Error_UserDate_Null", this.languageComponent1);
                return(false);
            }
            if (this.txtOnTimeEdit.Text.Trim().Length <= 0)
            {
                WebInfoPublish.Publish(this, "$Error_OnTime_Null", this.languageComponent1);
                return(false);
            }
            if (this.txtOffTimeEdit.Text.Trim().Length <= 0)
            {
                WebInfoPublish.Publish(this, "$Error_OffTime_Null", this.languageComponent1);
                return(false);
            }
            if (FormatHelper.TOTimeInt(this.txtOffTimeEdit.Text.Trim()) <= FormatHelper.TOTimeInt(this.txtOnTimeEdit.Text.Trim()))
            {
                WebInfoPublish.Publish(this, "$Message_OffTime_Must_Bigger_Than_OnTime", this.languageComponent1);
                return(false);
            }

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

            manager.Add(new DateRangeCheck(this.lblPlanDateFrom, this.datePlanDateFromQuery.Text, this.lblTo, this.datePlanDateToQuery.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.lblParamNameEdit, this.ddlParamNameEdit, 100, true));

            if (this.ddlParamNameEdit.SelectedValue.Trim().Length > 0)
            {
                string parameterName = this.ddlParamNameEdit.SelectedValue.Trim();

                if (_ParameterDic[parameterName] == typeof(string))
                {
                    manager.Add(new LengthCheck(this.lblParamValueEdit, this.txtParamValueEdit, 2000, true));
                }
                else if (_ParameterDic[parameterName] == typeof(DateTime))
                {
                    manager.Add(new LengthCheck(this.lblParamValueEdit, this.txtParamValueEdit, 2000, true));
                }
                else if (_ParameterDic[parameterName] == typeof(bool))
                {
                    //manager.Add(new LengthCheck(this.lblParamValueEdit, this.chbParamValueEdit, 2000, true));
                }
                else
                {
                    manager.Add(new LengthCheck(this.lblParamValueEdit, this.ddlParamValueEdit, 2000, true));
                }

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

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

            manager.Add(new LengthCheck(this.lblTsinfo, this.txtTsinfo, 400, true));
            //manager.Add(new NumberCheck(this.lblEqpTsDurationEdit, this.txtEqpTsDurationEdit, 0, 99999999, true));

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

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

            //manager.Add( new LengthCheck(this.lblMoConditionQuery,this.txtConditionMo.TextBox,System.Int32.MaxValue,true) );

            manager.Add(new DateRangeCheck(this.chbFrmDate, this.txtDateFrom.Text, lblFrmDateT, txtDateTo.Text, 0, 7, true));

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


            manager.Add(new NumberCheck(this.lblLineNoEdit, this.txtLineNoEdit, 0, int.MaxValue, true));
            manager.Add(new LengthCheck(this.lblItemIDEdit, this.txtItemIDEdit, 40, true));
            manager.Add(new LengthCheck(this.lblPlanQTYEdit, this.txtPlanQTYEdit, 22, true));
            if (this.txtOrderLine.Text.Trim() != "")
            {
                manager.Add(new NumberCheck(this.lblOrderLine, this.txtOrderLine, 0, int.MaxValue, false));
            }
            if (this.ViewState["RECType"].ToString() == this.languageComponent1.GetString(RecordType.RecordType_MO))
            {
                manager.Add(new LengthCheck(this.lblMOCode, this.txtMOCode, 40, true));
            }

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

            manager.Add(new LengthCheck(this.lblTransferNoEdit, this.txtTransferNoEdit, 40, true));
            manager.Add(new LengthCheck(this.lblFromStorageIDEdit, this.txtFromStorageIDQueryEdit, 40, true));

            if (!manager.Check())
            {
                WebInfoPublish.Publish(this, manager.CheckMessage, languageComponent1);
                return(false);
            }
            _InventoryFacade = new InventoryFacade(this.DataProvider);

            object obj = _InventoryFacade.GetStorage(
                (GlobalVariables.CurrentOrganizations.First()).OrganizationID,
                FormatHelper.CleanString(this.txtFromStorageIDQueryEdit.Text, 40));

            if (obj == null)
            {
                WebInfoPublish.Publish(this, "$BS_FromStorage_IS_NOT_Exist", languageComponent1);
                return(false);
            }
            if (FormatHelper.CleanString(this.txtToStorageIDQueryEdit.Text, 40) != "")
            {
                obj = _InventoryFacade.GetStorage((GlobalVariables.CurrentOrganizations.First()).OrganizationID,
                                                  FormatHelper.CleanString(this.txtToStorageIDQueryEdit.Text, 40));
                if (obj == null)
                {
                    WebInfoPublish.Publish(this, "$BS_ToStorage_IS_NOT_Exist", languageComponent1);
                    return(false);
                }
            }

            return(true);
        }