Exemple #1
0
        private void InitToolBar(OrderInfo order)
        {
            tooBarTop.btnNew.Visibility = Visibility.Collapsed;
            tooBarTop.retNew.Visibility = Visibility.Collapsed;
            //修改
            tooBarTop.btnEdit.Visibility = Visibility.Collapsed;
            tooBarTop.retEdit.Visibility = Visibility.Collapsed;
            //删除
            tooBarTop.btnDelete.Visibility = Visibility.Collapsed;

            tooBarTop.btnAudit.Visibility = Visibility.Visible;
            tooBarTop.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);

            tooBarTop.btnRefresh.Click +=new RoutedEventHandler(btnRefresh_Click);
            cbbOrderStatus = tooBarTop.cbxCheckState;
            cbbQueryList = tooBarTop.cbbQueryList;
            this.tooBarTop.ShowView(true);
            this.tooBarTop.stpCheckState.Visibility = Visibility.Collapsed;
            this.tooBarTop.BtnView.Visibility = Visibility.Collapsed;
            this.tooBarTop.retRead.Visibility = Visibility.Collapsed;
        }
Exemple #2
0
        private void InitToolBar(OrderInfo order)
        {
            // PermissionHelper.DisplayGridToolBarButton(this.tooBarTop, order.Type, true);
            Utility.DisplayGridToolBarButton(tooBarTop, order.Type, true);
            tooBarTop.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            tooBarTop.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            tooBarTop.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            tooBarTop.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            tooBarTop.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            tooBarTop.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            tooBarTop.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            cbbOrderStatus = tooBarTop.cbxCheckState;
            cbbQueryList = tooBarTop.cbbQueryList;
            this.tooBarTop.ShowView(false);

            if (this.DefaultEntity.OrderType == typeof(T_FB_SUMSETTINGSMASTER))
            {
                this.tooBarTop.stpCheckState.Visibility = Visibility.Collapsed;
                this.tooBarTop.btnAudit.Visibility = Visibility.Collapsed;
            }

            //if (this.DefaultEntity.OrderType == typeof(T_FB_CHARGEAPPLYMASTER) ||
            //        this.DefaultEntity.OrderType == typeof(T_FB_BORROWAPPLYMASTER) ||
            //            this.DefaultEntity.OrderType == typeof(T_FB_REPAYAPPLYMASTER))
            //{
            //    if (tooBarTop.btnNew.Visibility == System.Windows.Visibility.Visible)
            //    {
            //        tooBarTop.btnNew.Visibility = Visibility.Collapsed;
            //        tooBarTop.retNew.Visibility = Visibility.Collapsed;
            //    }

            //    if (tooBarTop.btnEdit.Visibility == System.Windows.Visibility.Visible)
            //    {
            //        tooBarTop.btnEdit.Visibility = Visibility.Collapsed;
            //        tooBarTop.retEdit.Visibility = Visibility.Collapsed;
            //    }

            //    if (tooBarTop.btnAudit.Visibility == System.Windows.Visibility.Visible)
            //    {
            //        tooBarTop.btnAudit.Visibility = Visibility.Collapsed;
            //        tooBarTop.retAudit.Visibility = Visibility.Collapsed;
            //    }
            //}

            // cbbOrderStatus.Visibility = Visibility.Visible;

            #region Added By 安凯航 2011年5月30日 增加借款单的导入功能

            if (this.DefaultEntity.OrderType == typeof(T_FB_BORROWAPPLYMASTER))
            {
                tooBarTop.btnImport.Visibility = System.Windows.Visibility.Visible;
                tooBarTop.btnImport.Click += new RoutedEventHandler(btnImportBorrowData_Click);
            }

            #endregion

            if ((this.DefaultEntity.OrderType == typeof(T_FB_DEPTBUDGETSUMMASTER) ||
                    this.DefaultEntity.OrderType == typeof(T_FB_COMPANYBUDGETSUMMASTER)))
            {
                tooBarTop.btnNew.Visibility = System.Windows.Visibility.Collapsed;
                tooBarTop.retNew.Visibility = System.Windows.Visibility.Collapsed;
                tooBarTop.btnDelete.Visibility = System.Windows.Visibility.Collapsed;
                tooBarTop.retDelete.Visibility = System.Windows.Visibility.Collapsed;
            }            
        }
Exemple #3
0
        private void InitControl(OrderInfo order)
        {
            this.ADtGrid.Grid.GridItems = order.View.GridItems;
            this.ADtGrid.Grid.InitControl(OperationTypes.Browse);
            cbbOrderStatus.SelectionChanged += new SelectionChangedEventHandler(cbbOrderStatus_SelectionChanged);
            cbbQueryList.SelectionChanged += new SelectionChangedEventHandler(cbbQueryList_SelectionChanged);
            OrderSource.SaveListCompleted += new EventHandler<ActionCompletedEventArgs<bool>>(OrderSource_SaveListCompleted);
            this.ADtGrid.Queryer.Querying += new EventHandler(Queryer_Querying);

            this.ADtGrid.Queryer.QueryCompleted += new EventHandler<QueryCompletedEventArgs>(Queryer_QueryCompleted);
        }
Exemple #4
0
 private void InitData(OrderInfo order)
 {
     CommonFunction.FillQueryComboBox<OrderStatusData>(this.cbbOrderStatus);
     ITextValueItem itemStatus = DataCore.AllSelectdData;// DataCore.FindReferencedData<OrderStatusData>("0");
     cbbOrderStatus.SelectedItem = itemStatus;
     this.ADtGrid.Queryer.QueryCompleted += new EventHandler<QueryCompletedEventArgs>(Queryer_QueryCompleted);
     GetOrders();
 }
Exemple #5
0
        private void InitData(OrderInfo order)
        {
            OrderEntity oe = new OrderEntity();
            

            List<ITextValueItem> queryList = new List<ITextValueItem>();

            QueryData qd = new QueryData();
            qd.Text= "待我审核的单据";
            qd.Value = "AuditedOrder";
            qd.QueryExpression = QueryExpressionHelper.Equal("AuditedBy", DataCore.CurrentUser.Value.ToString());
            qd.QueryExpression.QueryType = order.Type;
            queryList.Add(qd);
            
            CommonFunction.FillComboBox(this.cbbQueryList, queryList);

            cbbQueryList.SelectedIndex = 0;

            GetOrders();
        }
Exemple #6
0
 private void InitControl(OrderInfo order)
 {
     this.ADtGrid.GridItems = order.View.GridItems;
     this.ADtGrid.InitControl(OperationTypes.Browse);
     cbbQueryList.SelectionChanged += new SelectionChangedEventHandler(cbbQueryList_SelectionChanged);
     OrderSource.QueryFBEntitiesCompleted += new EventHandler<QueryFBEntitiesCompletedEventArgs>(OrderSource_QueryFBEntitiesCompleted);
 }
Exemple #7
0
        public static void InitOrderInfo()
        {
            XDocument xml = XDocument.Load("/SMT.FB.UI;component/Common/UIXml/UIConfig.xml");

            var orders = from p in xml.Element("FB").Element("Orders").Elements("Order")
                         select new
                         {
                             Name = p.Attribute("Name").Value,
                             Type = p.Attribute("Type").Value,

                             OrderEntity = p.Element("OrderEntity"),
                             View = p.Element("View"),
                             Form = p.Element("Form")
                         };
            foreach (var order in orders)
            {
                OrderInfo orderC = new OrderInfo();
                RuntimeOrder = orderC;
                orderC.Name = order.Name;
                orderC.Type = order.Type;

                orderC.OrderEntity = GetOrderEntityInfo(order.OrderEntity);
                orderC.View = GetViewInfo(order.View);
                orderC.Form = GetOrderForm(order.Form);

                XMLHelper.Orders.Add(orderC);
            }
            if (RefreshCompleted != null)
            {
                RefreshCompleted(null, null);
            }
           
        }