예제 #1
0
        public override void BeforeDataLoad(UFSoft.UBF.UI.IView.IPart Part, out bool executeDefault)
        {
            base.BeforeDataLoad(Part, out executeDefault);
            if (Part == null || Part.Model == null)
            {
                return;
            }
            part        = Part;
            _strongPart = Part as UFIDA.U9.SCM.SM.SOUIModel.StandardSOMainUIFormWebPart;
            //if (UFIDA.U9.UI.PDHelper.PDContext.Current.OrgRef.CodeColumn != "J002") return;//组织必须等于贸易中心
            if (!UFIDA.U9.Cust.GS.FT.PlugInUI.PubHelperUI.SOUIHelperExtend.IsTradeCenterOrg())
            {
                return;                                                                               //组织必须等于贸易中心
            }
            part.Model.ClearErrorMessage();

            IUFFldReference txtCustomer = CommonFunctionExtend.FindControl(this.part, "OrderBy_Customer0") as IUFFldReference;

            if (txtCustomer != null)
            {
                txtCustomer.ContentChanged += new EventHandler(txtCustomer_TextChanged);
                txtCustomer.AutoPostBack    = true;
            }
            //弹性域的注册事件得放到BeforeDataBinding,因为AfterInit中弹性域控件还未初始化
            if (txtOrderOrg == null)
            {
                txtOrderOrg = CommonFunctionExtend.FindControl(this.part, "DFFSO_Global_14") as IUFFldReference;
            }
            Register_CallBack_FDDocType_DoCustomerAction();
            //if (txtOrderOrg != null)
            //{
            //    txtOrderOrg.ContentChanged += new EventHandler(txtOrderOrg_ContentChanged);
            //    txtOrderOrg.AutoPostBack = true;
            //}
        }
예제 #2
0
        public void CreateButton(UFSoft.UBF.UI.IView.IPart ipart)
        {
            //按钮属性
            btnAllot.Text         = "销售业务员分配";
            btnAllot.ID           = "btnAllot";
            btnAllot.Visible      = true;
            btnAllot.AutoPostBack = true;

            //设定按钮位置
            IUFCard card = (IUFCard)part.GetUFControlByName(ipart.TopLevelContainer, "Card0");

            card.Controls.Add(btnAllot);
            CommonFunctionExtend.Layout(card, btnAllot, 6, 0);
            //按钮事件
            btnAllot.Click += new EventHandler(btnAllot_Click);
        }
예제 #3
0
        //public override

        //在试算页面创建按钮“检查按钮”
        public void CreateButton(UFSoft.UBF.UI.IView.IPart ipart)
        {
            //按钮属性
            btnItemSubTable.Text         = "料品子表";
            btnItemSubTable.ID           = "btnAllot";
            btnItemSubTable.Visible      = true;
            btnItemSubTable.AutoPostBack = true;

            //设定按钮位置
            IUFCard card = (IUFCard)part.GetUFControlByName(ipart.TopLevelContainer, "Card0");

            card.Controls.Add(btnItemSubTable);

            CommonFunctionExtend.Layout(card, btnItemSubTable, 8, 0);
            // CommonFunction.Layout(card, btnBind, 10, 0);

            //按钮事件
            btnItemSubTable.Click += new EventHandler(btnItemSubTable_Click);
        }
예제 #4
0
        /// <summary>
        /// 创建按钮
        /// </summary>
        private void CreateButton(UFIDA.U9.SCM.SM.SOUIModel.StandardSOMainUIFormWebPart aa)
        {
            #region 在操作按钮下添加按钮
            //获取操作下拉按钮
            UFSoft.UBF.UI.ControlModel.IUFDropDownButton dpCustQuery = (UFSoft.UBF.UI.ControlModel.IUFDropDownButton) this.part.GetUFControlByName(this.part.TopLevelContainer, "DDBtnOperation");
            //生成佣金
            BtnBrokerage              = new UFWebMenuAdapter();
            BtnBrokerage.Text         = "整单佣金生成";
            BtnBrokerage.ID           = "BtnBrokerage";
            BtnBrokerage.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnBrokerage_ItemClick);
            BtnBrokerage.AutoPostBack = true;

            //生成折扣
            BtnDiscount              = new UFWebMenuAdapter();
            BtnDiscount.Text         = "整单折扣生成";
            BtnDiscount.ID           = "BtnDiscount";
            BtnDiscount.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnDiscount_ItemClick);
            BtnDiscount.AutoPostBack = true;

            BtnSOBom              = new UFWebMenuAdapter();
            BtnSOBom.Text         = "整单BOM生成";
            BtnSOBom.ID           = "BtnSOBom";
            BtnSOBom.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnSOBom_ItemClick);
            BtnSOBom.AutoPostBack = true;

            BtnSubItemConfirm              = new UFWebMenuAdapter();
            BtnSubItemConfirm.Text         = "整单包材确认";
            BtnSubItemConfirm.ID           = "BtnSubItemConfirm";
            BtnSubItemConfirm.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnSubItemConfirm_ItemClick);
            BtnSubItemConfirm.AutoPostBack = true;

            BtnSubItemCancel              = new UFWebMenuAdapter();
            BtnSubItemCancel.Text         = "整单包材取消确认";
            BtnSubItemCancel.ID           = "BtnSubItemCancel";
            BtnSubItemCancel.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnSubItemCancel_ItemClick);
            BtnSubItemCancel.AutoPostBack = true;

            BtnCreateBroAndDis              = new UFWebMenuAdapter();
            BtnCreateBroAndDis.Text         = "一键创建订单折扣&佣金";
            BtnCreateBroAndDis.ID           = "BtnCreateBroAndDis";
            BtnCreateBroAndDis.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnCreateBroAndDis_ItemClick);
            BtnCreateBroAndDis.AutoPostBack = true;

            dpCustQuery.MenuItems.Add(BtnBrokerage);
            dpCustQuery.MenuItems.Add(BtnDiscount);
            dpCustQuery.MenuItems.Add(BtnSOBom);

            dpCustQuery.MenuItems.Add(BtnSubItemConfirm);
            dpCustQuery.MenuItems.Add(BtnSubItemCancel);
            dpCustQuery.MenuItems.Add(BtnCreateBroAndDis);

            #endregion

            #region 自定义订单明细下拉按钮
            UFSoft.UBF.UI.ControlModel.IUFDropDownButton dpSODetail = new UFWebDropDownButtonAdapter();
            dpSODetail.Text = "订单明细";
            dpSODetail.ID   = "dpSODetail";

            IUFMenu BtnDiscountDetail = new UFWebMenuAdapter();
            BtnDiscountDetail.Text         = "订单折扣";
            BtnDiscountDetail.ID           = "BtnDiscountDetail";
            BtnDiscountDetail.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnDiscountDetail_ItemClick);
            BtnDiscountDetail.AutoPostBack = true;

            //订单佣金
            IUFMenu BtnOrderBrokerage = new UFWebMenuAdapter();
            BtnOrderBrokerage.Text         = "订单佣金";
            BtnOrderBrokerage.ID           = "BtnOrderBrokerage";
            BtnOrderBrokerage.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnOrderBrokerage_ItemClick);
            BtnOrderBrokerage.AutoPostBack = true;

            //订单费用
            IUFMenu BtnFeeAmount = new UFWebMenuAdapter();
            BtnFeeAmount.Text         = "订单费用";
            BtnFeeAmount.ID           = "BtnFeeAmount";
            BtnFeeAmount.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnFeeAmount_ItemClick);
            BtnFeeAmount.AutoPostBack = true;

            //订单Bom
            IUFMenu BtnOrderBom = new UFWebMenuAdapter();
            BtnOrderBom.Text         = "随单Bom";
            BtnOrderBom.ID           = "BtnOrderBom";
            BtnOrderBom.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnOrderBom_ItemClick);
            BtnOrderBom.AutoPostBack = true;

            IUFMenu BtnAssessType = new UFWebMenuAdapter();
            BtnAssessType.Text         = "评估类型";
            BtnAssessType.ID           = "BtnAssessType";
            BtnAssessType.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnAssessType_ItemClick);
            BtnAssessType.AutoPostBack = true;

            IUFMenu BtnForecast = new UFWebMenuAdapter();
            BtnForecast.Text         = "预测订单";
            BtnForecast.ID           = "BtnForecast";
            BtnForecast.ItemClick   += new UFSoft.UBF.UI.WebControls.MenuItemHandle(BtnForecast_ItemClick);
            BtnForecast.AutoPostBack = true;

            dpSODetail.MenuItems.Add(BtnOrderBrokerage);
            dpSODetail.MenuItems.Add(BtnFeeAmount);
            dpSODetail.MenuItems.Add(BtnOrderBom);
            dpSODetail.MenuItems.Add(BtnDiscountDetail);
            dpSODetail.MenuItems.Add(BtnAssessType);
            dpSODetail.MenuItems.Add(BtnForecast);

            IUFCard card = (IUFCard)part.GetUFControlByName(part.TopLevelContainer, "Card0");
            card.Controls.Add(dpSODetail);
            CommonFunctionExtend.Layout(card, dpSODetail, 18, 0);
            #endregion

            #region 在工具栏加按钮
            IUFToolbar _Toolbar = (IUFToolbar)part.GetUFControlByName(part.TopLevelContainer, "Toolbar1");

            btnPrints = UIControlBuilder.BuilderToolbarButton(_Toolbar, "True", "btnPrints", "True", "True", 70, 28, "7", "", true, false, "36BA88E0-FC28-402e-B9BA-3745A6771687", "36BA88E0-FC28-402e-B9BA-3745A6771687", "9307E981-85AA-4f19-ADB7-340D159F4A01");
            UIControlBuilder.SetButtonAccessKey(btnPrints);
            btnPrints.UIModel = part.Model.ElementID;
            btnPrints.Action  = "";
            btnPrints.Text    = "唛头打印";
            ((UFWebToolbarAdapter)_Toolbar).Items.Add(btnPrints as System.Web.UI.WebControls.WebControl);
            btnPrints.Click += new EventHandler(CustomerItemPrint_Click);
            #endregion
        }