示例#1
0
        public UCEntryStatusOperation(EntryStatusOperation _action, int _ProductSysNo)
        {
            this.action       = _action;
            this.ProductSysNo = _ProductSysNo;
            InitializeComponent();
            facades = new ProductEntryFacade(CPApplication.Current.CurrentPage);

            switch (action)
            {
            case EntryStatusOperation.Audit:
                this.btnAuditSucess.Visibility = System.Windows.Visibility.Visible;
                this.btnAuditFail.Visibility   = System.Windows.Visibility.Visible;
                break;

            case EntryStatusOperation.Inspection:
                this.btnInspectionSucess.Visibility = System.Windows.Visibility.Visible;
                this.btnInspectionFail.Visibility   = System.Windows.Visibility.Visible;
                break;

            case EntryStatusOperation.Customs:
                this.btnCustomsSucess.Visibility = System.Windows.Visibility.Visible;
                this.btnCustomsFail.Visibility   = System.Windows.Visibility.Visible;
                break;
            }
        }
示例#2
0
        void ProductMaintainEntryInfo_Loaded(object sender, RoutedEventArgs e)
        {
            vm      = new ProductEntryInfoVM();
            facades = new ProductEntryFacade(CPApplication.Current.CurrentPage);
            string tempSysNo = string.Empty;

            if (CurrentPage.Context.Request.QueryString != null)
            {
                tempSysNo = CurrentPage.Context.Request.QueryString["ProductSysNo"];
            }
            if (!string.IsNullOrEmpty(CurrentPage.Context.Request.Param))
            {
                tempSysNo = CurrentPage.Context.Request.Param;
            }
            int productSysNo;

            if (Int32.TryParse(tempSysNo, out productSysNo))
            {
                facades.LoadProductEntryInfo(productSysNo, (obj, args) =>
                {
                    vm = EntityConverter <ProductEntryInfo, ProductEntryInfoVM> .Convert(
                        args.Result,
                        (s, t) =>
                        { });
                    this.DataContext = vm;
                });
            }
            else
            {
                this.DataContext = vm;
            }
        }
        public void ProductMaintainBasicEntryInfo_Loaded(showbutton showProductEntryButton)
        {
            vm      = new ProductEntryInfoVM();
            facades = new ProductEntryFacade(CPApplication.Current.CurrentPage);
            string tempSysNo = string.Empty;

            if (CurrentPage.Context.Request.QueryString != null)
            {
                tempSysNo = CurrentPage.Context.Request.QueryString["ProductSysNo"];
            }
            if (!string.IsNullOrEmpty(CurrentPage.Context.Request.Param))
            {
                tempSysNo = CurrentPage.Context.Request.Param;
            }
            int productSysNo;

            if (Int32.TryParse(tempSysNo, out productSysNo))
            {
                facades.LoadProductEntryInfo(productSysNo, (obj, args) =>
                {
                    if (args.Result == null)
                    {
                        CPApplication.Current.CurrentPage.Context.Window.Alert("商品信息错误!");
                        return;
                    }

                    vm = EntityConverter <ProductEntryInfo, ProductEntryInfoVM> .Convert(
                        args.Result,
                        (s, t) =>
                        { });
                    EntryBizcmb.SelectedIndex  = 0;
                    StoreTypecmb.SelectedIndex = 0;
                    showProductEntryButton();
                    this.DataContext = vm;
                });
            }
            else
            {
                StoreTypecmb.SelectedIndex = 0;
                EntryBizcmb.SelectedIndex  = 0;
                this.DataContext           = vm;
            }
        }