Exemplo n.º 1
0
        protected void cmdAdd_ServerClick(object sender, System.EventArgs e)
        {
            object obj = this.GetEditObject();

            if (obj != null)
            {
                if (_MOFacade.GetFirstCheckByMO(
                        FormatHelper.PKCapitalFormat(FormatHelper.CleanString(((FirstCheckByMO)obj).MOCode)),
                        ((FirstCheckByMO)obj).CheckDate) != null)
                {
                    WebInfoPublish.Publish(this, "$Error_Primary_Key_Overlap", languageComponent1);
                    return;
                }
                ;
                if (_MOFacade.GetMO(FormatHelper.CleanString(((FirstCheckByMO)obj).MOCode)) == null)
                {
                    WebInfoPublish.Publish(this, "$Error_Input_MoCode", languageComponent1);
                    return;
                }
                this._MOFacade.AddFirstCheckByMO((FirstCheckByMO)obj);

                this.RequestData();
                this.buttonHelper.PageActionStatusHandle(PageActionType.Add);
            }
        }