Example #1
0
        //回傳值 true.通過驗證 false.未通過驗證,會把值還原
        protected override bool WfItemCheck(object sender, ItemCheckInfo e)
        {
            int                iChkCnts    = 0;
            vw_invt522         masterModel = null;
            vw_invt522s        detailModel = null;
            List <vw_invt521s> listDetails = null;
            UltraGrid          uGrid       = null;

            try
            {
                masterModel = DrMaster.ToItem <vw_invt522>();
                #region 單身-pick vw_invt521s
                if (e.Row.Table.Prefix.ToLower() == "vw_invt522s")
                {
                    uGrid       = sender as UltraGrid;
                    detailModel = e.Row.ToItem <vw_invt522s>();
                    listDetails = e.Row.Table.ToList <vw_invt521s>();
                    switch (e.Column.ToLower())
                    {
                    case "ipb50":    //監盤數量
                        if (GlobalFn.varIsNull(e.Value))
                        {
                            WfShowErrorMsg("請輸入異動數量!");
                            return(false);
                        }
                        if (GlobalFn.isNullRet(e.Value, 0) < 0)
                        {
                            WfShowErrorMsg("數量不可小於0!");
                            return(false);
                        }
                        break;
                    }
                }
                #endregion
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        protected override Boolean WfDisplayMode()
        {
            vw_invt522 masterModel = null;

            try
            {
                if (FormEditMode == YREditType.NA)
                {
                    WfSetControlsReadOnlyRecursion(this, true);
                }
                else
                {
                    WfSetControlsReadOnlyRecursion(this, false); //先全開
                    WfSetControlsReadOnlyRecursion(ute_ipa01.Parent, true);
                    WfSetControlsReadOnlyRecursion(ute_ipacreu.Parent, true);
                }

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }