Exemplo n.º 1
0
        public override void AfterInit(UFSoft.UBF.UI.IView.IPart part, EventArgs args)
        {
            #region 获取相关强类型数据

            _strongPart = part as BaseWebForm;
            if (_strongPart == null)
            {
                return;
            }

            #endregion

            #region 添加控件模板事件方法部分

            //实例化控件
            UFSoft.UBF.UI.ControlModel.IUFContainer Card0
                = (UFSoft.UBF.UI.ControlModel.IUFContainer)part.GetUFControlByName(part.TopLevelContainer, "CardPlusFunction");


            //增加查询库存按钮
            this.btnQueryWhQoh              = UIControlBuilder.BuilderUFButton(Card0, true, "btnQueryWhQoh", true, true, 80, 20, 2, 0, 1, 1, "100", "", "", "btnQueryWhQoh", false, "", "", "7a847b62-5778-42db-abed-e41fb6130a76");
            this.btnQueryWhQoh.Text         = "库存查询";
            this.btnQueryWhQoh.AutoPostBack = true;
            this.btnQueryWhQoh.Click       += new EventHandler(btnQueryWhQoh_Click);

            #endregion
        }
        /// <summary>
        /// 前台Alert
        /// </summary>
        /// <param name="part"></param>
        /// <param name="theMessage"></param>
        public void ShowAlertMessage(IPart part, string theMessage)
        {
            BaseWebForm webPart = part as BaseWebForm;

            if (webPart == null)
            {
                return;
            }

            string alertScript = GetAlertScript(theMessage);

            AtlasHelper.RegisterAtlasStartupScript(webPart.Page, webPart.Page.GetType(), Guid.NewGuid().ToString(), alertScript, false);
        }