Exemplo n.º 1
0
 void SettledProductsRuleMaintain_Loaded(object sender, RoutedEventArgs e)
 {
     this.Loaded     -= new RoutedEventHandler(SettledProductsRuleMaintain_Loaded);
     serviceFacade    = new ConsignSettlementRulesFacade(CPApplication.Current.CurrentPage);
     poFacade         = new PurchaseOrderFacade(CPApplication.Current.CurrentPage);
     this.DataContext = editVM;
     ShowActionButtons();
 }
Exemplo n.º 2
0
 public SettledProductsRuleNew()
 {
     InitializeComponent();
     viewVM        = new ConsignSettlementRulesInfoVM();
     serviceFacade = new ConsignSettlementRulesFacade(CPApplication.Current.CurrentPage);
     poFacade      = new PurchaseOrderFacade(CPApplication.Current.CurrentPage);
     this.ucProduct.ProductSelected += new EventHandler <Basic.Components.UserControls.ProductPicker.ProductSelectedEventArgs>(ucProduct_ProductSelected);
     this.Loaded += new RoutedEventHandler(SettledProductsRuleNew_Loaded);
 }
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);
            queryVM       = new ConsignSettlementRulesQueryVM();
            serviceFacade = new ConsignSettlementRulesFacade(this);
            poFacade      = new PurchaseOrderFacade(this);
            queryFilter   = new SettleRuleQueryFilter();

            InitializeComboBoxData();
            this.DataContext = queryVM;

            if (!string.IsNullOrEmpty(this.Request.Param))
            {
                //如果有传入的getSettleName参数:
                string getSettleName = this.Request.Param;
                queryVM.SettleRuleName = getSettleName;
                btnSearch_Click(null, null);
            }
        }