コード例 #1
0
        public override OutputData DoAction(IInputData input)
        {
            PageStyle style = input.Style.Style;
            KeyData   data  = null;

            if (style == PageStyle.Delete)
            {
                try
                {
                    Prepare();
                    data = DoDeleteAction(input);
                }
                catch (WebPostException ex)
                {
                    return(OutputData.CreateToolkitObject(ex.CreateErrorResult()));
                }
            }
            else
            {
                TkDebug.ThrowToolkitException(string.Format(ObjectUtil.SysCulture,
                                                            "当前支持页面类型为Delete,当前类型是{0}", input.Style), this);
            }

            return(OutputData.CreateToolkitObject(data));
        }
コード例 #2
0
        private KeyData DoDeleteAction(IInputData input)
        {
            DefaultUpdateAction(input);

            DataRow row    = MainRow;
            KeyData result = MainResolver.CreateKeyData(row);

            MainResolver.Delete(input);

            Commit(input);
            return(result);
        }