コード例 #1
0
ファイル: QueryOrder.xaml.cs プロジェクト: JuRogn/OA
 public QueryFBOrder()
 {
     InitializeComponent();
     this.FBBasePageLoaded += new EventHandler(QueryBudgetAccount_FBBasePageLoaded);
     fbEntityService = new FBEntityService();
     fbEntityService.QueryFBEntitiesCompleted += new EventHandler<QueryFBEntitiesCompletedEventArgs>(fbEntityService_QueryFBEntitiesCompleted);
 }
コード例 #2
0
ファイル: DeptBudgetAddForm.cs プロジェクト: JuRogn/OA
 public DeptBudgetAddForm(OrderEntity orderEntity)
     : base(orderEntity)
 {
     fbService = new FBEntityService();
     fbService.QueryFBEntitiesCompleted += new EventHandler<QueryFBEntitiesCompletedEventArgs>(fbService_QueryFBEntitiesCompleted);
     this.EditForm.Saving += new EventHandler<SavingEventArgs>(EditForm_Saving);
 }
コード例 #3
0
ファイル: DataCore.cs プロジェクト: jjg0519/OA
        public static void InitDataCore()
        {
            if (SMT.SAAS.Main.CurrentContext.Common.CurrentConfig == null)
            {
                throw new Exception("没有登录信息");
            }
            CompanyList = new List <VirtualCompany>();

            //InitHR(); --2011年6月21日注释,原因是:新平台组织架构缓存是按需加载,因此不能直接使用了
            InitHR();  // 新的加载2013.12.24

            FBEntityService service = new FBEntityService();

            service.QueryFBEntitiesCompleted += new EventHandler <QueryFBEntitiesCompletedEventArgs>(service_QueryFBEntitiesCompleted);

            var fbVersion = "";

            service.QueryFBEntities(new QueryExpression()
            {
                QueryType = "InitDataCore", PropertyName = "FBVerson", PropertyValue = fbVersion
            });

            SuperUser                  = new EmployeerData();
            SuperUser.Company          = new CompanyData();
            SuperUser.Department       = new DepartmentData();
            SuperUser.Post             = new PostData();
            SuperUser.Company.Value    = "001";
            SuperUser.Company.Text     = "001";
            SuperUser.Department.Value = "001";
            SuperUser.Department.Text  = "001";
            SuperUser.Post.Value       = "001";
            SuperUser.Post.Text        = "001";
            SuperUser.Value            = "001";
            SuperUser.Text             = "001";
        }
コード例 #4
0
ファイル: PersonMoneyAssignAAForm.cs プロジェクト: JuRogn/OA
 /// <summary>
 /// 个人经费下拨 构造函数
 /// </summary>
 /// <param name="orderEntity"></param>
 public PersonMoneyAssignAAForm(OrderEntity orderEntity)
     : base(orderEntity)
 {
     fbService = new FBEntityService();
     fbService.QueryFBEntitiesCompleted += new EventHandler<QueryFBEntitiesCompletedEventArgs>(fbService_QueryFBEntitiesCompleted);
     this.EditForm.Saving += new EventHandler<SavingEventArgs>(EditForm_Saving);
 }
コード例 #5
0
ファイル: ServiceHelper.cs プロジェクト: JuRogn/OA
 public static void QueryFBEntities(QueryExpression qe, Action<object, QueryFBEntitiesCompletedEventArgs> callBackMethod)
 {
     FBEntityService service = new FBEntityService();
     service.QueryFBEntitiesCompleted += (o, e) =>
         {
             callBackMethod(o, e);
         };
     service.QueryFBEntities(qe);
 }
コード例 #6
0
ファイル: SystemSetting.xaml.cs プロジェクト: JuRogn/OA
 void SystemSetting_FBBasePageLoaded(object sender, EventArgs e)
 {
     InitToolBar();
     FBEntityService fbService = new FBEntityService();
     QueryExpression qe = new QueryExpression();
     qe.QueryType = typeof(T_FB_SYSTEMSETTINGS).Name;
     fbService.QueryFBEntitiesCompleted += new EventHandler<QueryFBEntitiesCompletedEventArgs>(fbService_QueryFBEntitiesCompleted);
     fbService.QueryFBEntities(qe);
 }
コード例 #7
0
ファイル: ServiceHelper.cs プロジェクト: jjg0519/OA
        public static void QueryFBEntities(QueryExpression qe, Action <object, QueryFBEntitiesCompletedEventArgs> callBackMethod)
        {
            FBEntityService service = new FBEntityService();

            service.QueryFBEntitiesCompleted += (o, e) =>
            {
                callBackMethod(o, e);
            };
            service.QueryFBEntities(qe);
        }
コード例 #8
0
ファイル: SumSettingsForm.cs プロジェクト: JuRogn/OA
 /// <summary>
 /// 预算汇总设置 构造函数
 /// </summary>
 /// <param name="orderEntity"></param>
 public SumSettingsForm(OrderEntity orderEntity)
     : base(orderEntity)
 {
     fbService = new FBEntityService();
     this.EditForm.Saving += new EventHandler<SavingEventArgs>(EditForm_Saving);
 }
コード例 #9
0
ファイル: DeptBudgetSumForm.cs プロジェクト: JuRogn/OA
        protected override void OnLoadControlComplete()
        {
            base.OnLoadControlComplete();
            DetailGrid grid = this.EditForm.FindControl("OrderGrid") as DetailGrid;
            if (grid != null)
            {
                grid.P1.Visibility = System.Windows.Visibility.Visible;
                List<ToolbarItem> list = new List<ToolbarItem>();
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "S1",
                    Title = "按科目查看",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png",


                };
                list.Add(item);
                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "S2",
                    Title = "按公司部门单据查看",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };
                list.Add(item);

                grid.AddToolBarItems(list);
            }
            var dGrid = grid;
            dGrid.ADGrid.LoadingRow += (object sender, DataGridRowEventArgs e) =>
            {
                if ((this.EditForm.OperationType == OperationTypes.Add
                    || this.EditForm.OperationType == OperationTypes.Edit
                    || this.EditForm.OperationType == OperationTypes.ReSubmit) && SumType == 1)
                {
                    var con = dGrid.ADGrid.Columns[7].GetCellContent(e.Row) as StackPanel;
                    Action a2 = () =>
                    {
                        Label label = new Label();
                        label.Content = "已打回";
                        con.Children.Clear();
                        con.Children.Add(label);
                    };

                    Action a1 = () =>
                    {
                        ImageButton myButton = new ImageButton();
                        myButton.Margin = new Thickness(0);
                        myButton.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", "打回");
                        myButton.Tag = e.Row.DataContext;
                        myButton.Click += (oo, ee) =>
                        {
                            Control c = oo as Control;
                            var entity = c.Tag as FBEntity;
                            Action action = () =>
                            {

                                // dGrid.Delete(new List<FBEntity> { entity });
                                var saveEntity = entity.Entity.ToFBEntity();
                                saveEntity.SetObjValue("Entity.CHECKSTATES", 4);
                                saveEntity.FBEntityState = FBEntityState.Modified;
                                FBEntityService fbs = new FBEntityService();
                                fbs.SetVisitUser(saveEntity);
                                fbs.FBService.SaveCompleted += (ooo, eee) =>
                                {
                                    this.CloseProcess();
                                    if (eee.Error != null)
                                    {
                                        CommonFunction.ShowErrorMessage("操作失败, " + eee.Error.Message);

                                    }
                                    else if (eee.Result.Exception != null)
                                    {
                                        CommonFunction.ShowErrorMessage(eee.Result.Exception);
                                    }
                                    else
                                    {
                                        a2();
                                    }
                                };
                                this.ShowProcess();

                                CurrentUserPost user = new CurrentUserPost();
                                user.EmployeeName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
                                user.EmployeeID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                                user.PostName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName;
                                user.DepartmentName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName;
                                user.CompanyName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
                              
                                fbs.FBService.SaveAsync(saveEntity,user);
                                // none;
                            };
                            var personName = entity.GetObjValue("Entity.T_FB_DEPTBUDGETAPPLYMASTER.OWNERDEPARTMENTNAME");

                            var msg = "你确定要打回 [" + personName + "] 的部门月度预算吗?";
                            CommonFunction.AskDelete(msg, action);
                        };
                        con.Children.Clear();
                        con.Children.Add(myButton);
                    };

                    var cs = e.Row.DataContext.GetObjValue("Entity.CHECKSTATES") as decimal?;
                    if (cs.Equal(4))
                    {
                        a2();
                    }
                    else
                    {
                        a1();
                    }
                }
            };     


            grid.deatilGridBar.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(deatilGridBar_ItemClicked);
            deatilGridBar_ItemClicked(grid, new ToolBar.ToolBarItemClickArgs("S1"));
        }