Ejemplo n.º 1
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            if (formType != FormTypes.Browse && formType != FormTypes.Audit)
            {
                if (!isAlterTrave)//修改行程不需显示
                {
                    ToolbarItem item = new ToolbarItem
                    {
                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "0",
                        Title = Utility.GetResourceStr("SAVE"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                    };
                    items.Add(item);
                }
            }
            if (Master_Golbal!=null&&
                Master_Golbal.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString()
                && formType==FormTypes.Edit)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "3",
                    Title = "删除",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
                };
                items.Add(item);
            }

            return items;
        }
Ejemplo n.º 2
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = "保存",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };


            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = "保存并关闭",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
            };

            items.Add(item);
            items.Clear();

            return items;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 设置工具栏按钮
 /// </summary>
 /// <param name="arr"></param>
 /// <returns></returns>
 public static List<ToolbarItem> GetToolBarItems(ref object[,] arr)
 {
     List<ToolbarItem> items = new List<ToolbarItem>();
     ToolbarItem item;
     for (int i = 0; i < arr.GetLength(0); i++)
     {
         item = new ToolbarItem
        {
            DisplayType = (ToolbarItemDisplayTypes)arr[i, 0],
            Key = (string)arr[i, 1],
            Title = Utility.GetResourceStr((string)arr[i, 2]),
            ImageUrl = (string)arr[i, 3]
        };
         items.Add(item);
     }
     return items;
 }
Ejemplo n.º 4
0
        private void InitToolBar()
        {
            List<ToolbarItem> list = new List<ToolbarItem>();
            list.Add(ToolBarItems.Save);

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "CheckBudget",
                Title = "预算结算",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
            };
            list.Add(item);
            tooBarTop.InitToolBarItem(list);
            tooBarTop.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(tooBarTop_ItemClicked);

        }
Ejemplo n.º 5
0
 public List<ToolbarItem> GetToolBarItems()
 {
     List<ToolbarItem> items = new List<ToolbarItem>();
     ToolbarItem item = new ToolbarItem
       {
           DisplayType = ToolbarItemDisplayTypes.Image,
           Key = "1",
           Title = Utility.GetResourceStr("SAVEANDCLOSE"),
           ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
       };
     items.Add(item);
     item = new ToolbarItem
     {
         DisplayType = ToolbarItemDisplayTypes.Image,
         Key = "0",
         Title = Utility.GetResourceStr("SAVE"),
         ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
     };
     items.Add(item);
     return items;
 }
Ejemplo n.º 6
0
        private void InitToolBar()
        {
            List<ToolbarItem> list = new List<ToolbarItem>();


            ToolbarItem item = ToolBarItems.Save;
            list.Add(item);

             item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "AddType",
                    Title = "添加科目类型",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };
            list.Add(item);
            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "AddSubject",
                Title = "添加同级科目",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
            };
            list.Add(item);
            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "AddSubSubject",
                Title = "添加子级科目",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
            };
            list.Add(item);
            
            item = ToolBarItems.Delete;
            list.Add(item);

            tooBarTop.InitToolBarItem(list);
            tooBarTop.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(tooBarTop_ItemClicked);
            
        }
Ejemplo n.º 7
0
        public List<ToolbarItem> GetToolBarItems()//代码隐藏实现按钮加载
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            if (FormTypesAction != FormTypes.Browse && FormTypesAction != FormTypes.Audit && FormTypesAction != FormTypes.Resubmit)
            {
                if (FormTypesAction != FormTypes.New && BorrowMasterEntity.CHECKSTATES == 0)
                {
                    items.Add(ToolBarItems.Delete);
                }
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"

                };
                items.Add(item);
            }
          


            return items;
        }
Ejemplo n.º 8
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            if (formType != FormTypes.Browse && formType != FormTypes.Audit)
            {
                //ToolbarItem item = new ToolbarItem
                //{
                //    DisplayType = ToolbarItemDisplayTypes.Image,
                //    Key = "1",
                //    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                //};
                //items.Add(item);

                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                };
                items.Add(item);
            }
            if (TravelReimbursement_Golbal!=null
                &&TravelReimbursement_Golbal.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString()
                && formType==FormTypes.Edit)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "3",
                    Title = "删除",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
                };
                items.Add(item);                          
            }
            return items;
        }
Ejemplo n.º 9
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("CANCELMEETINGCONFIRM"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/18_audit.png"

            };
            items.Add(item);
            
            return items;
        }
Ejemplo n.º 10
0
        private List<ToolbarItem> CreateFormEditButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("SAVE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };

            items.Add(item);

            

            return items;
        }
Ejemplo n.º 11
0
        private List<ToolbarItem> CreateFormEditButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("SAVE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };

            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("CLOSE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_Close.png"
            };

            items.Add(item);



            //item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "5",
            //    Title = "提交审核",
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
            //};

            //items.Add(item);
            //item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "6",
            //    Title = "审核",//"审核"
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
            //};

            //items.Add(item);
            //item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "7",
            //    Title = "审核不通过",//"审核不通过"
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png"
            //};

            //items.Add(item);

            return items;
        }
Ejemplo n.º 12
0
        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"));
        }
Ejemplo n.º 13
0
 public List<ToolbarItem> GetToolBarItems()
 {
     List<ToolbarItem> items = new List<ToolbarItem>();
     ToolbarItem item = new ToolbarItem
     {
         DisplayType = ToolbarItemDisplayTypes.Image,
         Key = "0",
         Title = Utility.GetResourceStr("CREATE"),
         ImageUrl = "/SMT.HRM.UI;Component/Images/ToolBar/16_save.png"
     };
     items.Add(item);
     return items;
 }
Ejemplo n.º 14
0
        private List<ToolbarItem> CreateFormNewButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            //ToolbarItem item1 = new ToolbarItem
            // {
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "2",
            //    Title = Utility.GetResourceStr("SUBMITAUDIT"),
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
            //};
            
            //item1.ItemClick += new EventHandler<RoutedEventArgs>(item_ItemClick);

            //items.Add(item1);
            if (formTypeAction != FormTypes.Browse && formTypeAction != FormTypes.Audit)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "1",
                    //Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                };

                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                };

                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "3",
                    Title = Utility.GetResourceStr("CHOOSELICENSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };

                items.Add(item);
            }

            return items;
        }
Ejemplo n.º 15
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            if (formTypeAction == FormTypes.New || formTypeAction == FormTypes.Edit || formTypeAction == FormTypes.Resubmit)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "1",
                    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                };

                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                };
                items.Add(item);



                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "3",
                    Title = Utility.GetResourceStr("DELETEHOUSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
                };

                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "2",
                    Title = Utility.GetResourceStr("CHOOSEHOUSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };

                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "4",
                    Title = Utility.GetResourceStr("CHOOSEDISTRBUTEOBJECT"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };

                items.Add(item);
            }
            return items;
        }       
Ejemplo n.º 16
0
 private void SetToolBar()
 {
     if (FormType == FormTypes.Audit)
         toolbarItems = Utility.CreateFormEditButton("T_HR_SALARYRECORDBATCH", SalaryRecordBatch.OWNERID,
                        SalaryRecordBatch.OWNERPOSTID, SalaryRecordBatch.OWNERDEPARTMENTID, SalaryRecordBatch.OWNERCOMPANYID);
     if (SalaryRecordBatch.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString())
     {
         toolbarItems.Clear();
         ToolbarItem item = new ToolbarItem
         {
             DisplayType = ToolbarItemDisplayTypes.Image,
             Key = "9",
             Title = Utility.GetResourceStr("BANKPAY"),// "保存",
             ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png"
         };
         toolbarItems.Add(item);
         ToolbarItem item1 = new ToolbarItem
         {
             DisplayType = ToolbarItemDisplayTypes.Image,
             Key = "10",
             Title = Utility.GetResourceStr("关闭待办"),// "保存",
             ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png"
         };
         toolbarItems.Add(item1);
     }
     RefreshUI(RefreshedTypes.All);
 }
Ejemplo n.º 17
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            if (action != FormTypes.Browse && action != FormTypes.Audit)
            {
                //ToolbarItem item = new ToolbarItem
                //{
                //    DisplayType = ToolbarItemDisplayTypes.Image,
                //    Key = "2", //提交审核
                //    Title = Utility.GetResourceStr("SUBMITAUDIT"),// "提交审核",
                //    ImageUrl = "/SMT.SaaS.OA.UI;Component/Images/18_audit.png"
                //};
                //items.Add(item);
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "1", //保存并关闭
                    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                };
                items.Add(item);
                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"

                };
                items.Add(item);
            }
            return items;
        }
Ejemplo n.º 18
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            //ToolbarItem item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "3",
            //    //Title = Utility.GetResourceStr("MEETINGMEMBER"),
            //    Title ="选择公司",
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addTeam.png"

            //};
            //items.Add(item);

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
            };

            items.Add(item);
            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("SAVE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };

            items.Add(item);
            

            return items;
        }
Ejemplo n.º 19
0
        public List<ToolbarItem> GetToolBarItems()
        {
            object[,] arr = new object[,]{
             {ToolbarItemDisplayTypes.Image,"0","CONFIRMBUTTON","/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"},
            };

            List<ToolbarItem> items = new List<ToolbarItem>();
            ToolbarItem item;
            for (int i = 0; i < arr.GetLength(0); i++)
            {
                item = new ToolbarItem
                {
                    DisplayType = (ToolbarItemDisplayTypes)arr[i, 0],
                    Key = (string)arr[i, 1],
                    Title = Utility.GetResourceStr((string)arr[i, 2]),
                    ImageUrl = (string)arr[i, 3]
                };
                items.Add(item);
            }
            return items;
        }
Ejemplo n.º 20
0
        private List<ToolbarItem> CreateFormNewButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            //ToolbarItem item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "2",
            //    Title = Utility.GetResourceStr("SUBMITAUDIT"),
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
            //};
            

            //items.Add(item);

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_SaveClose.png"
            };
            
            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",

                Title = Utility.GetResourceStr("SAVE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_Save.png"
            };

            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "3",
                Title = Utility.GetResourceStr("CHOOSELICENSE"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
            };

            items.Add(item);

            return items;
        }
Ejemplo n.º 21
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            if (actions != FormTypes.Browse && actions != FormTypes.Audit)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "2",
                    Title = Utility.GetResourceStr("SELECTACCESSORIES"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
                };
                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "1",
                    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                };
                items.Add(item);

                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("SAVE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                };
                items.Add(item);
            }
            return items;
        }
Ejemplo n.º 22
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            if (isSaving == false)
            {
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "0",
                    Title = Utility.GetResourceStr("CREATE"),
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_workrules.png"
                };

                items.Add(item);

                //item = new ToolbarItem
                //{
                //    DisplayType = ToolbarItemDisplayTypes.Image,
                //    Key = "1",
                //    Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                //    ImageUrl = "/SMT.HRM.UI;Component/Images/ToolBar/16_saveClose.png"
                //};

                //items.Add(item);
            }
            return items;
        }
Ejemplo n.º 23
0
        private List<ToolbarItem> CreateFormNewButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            switch (FromFormFlag)
            {
                case "0":
                    //ToolbarItem item = new ToolbarItem
                    //{
                    //    DisplayType = ToolbarItemDisplayTypes.Image,
                    //    Key = "3",
                    //    Title = Utility.GetResourceStr("SUBMITAUDIT"),
                    //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
                    //};
                    //items.Add(item);

                    ToolbarItem item = new ToolbarItem
                    {
                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "2",
                        Title = Utility.GetResourceStr("CHOOSEHOUSE"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"

                    };
                    items.Add(item);
                    item = new ToolbarItem
                    {
                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "1",
                        Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
                    };
                    items.Add(item);

                    item = new ToolbarItem
                    {
                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "0",
                        Title = Utility.GetResourceStr("SAVE"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
                    };
                    items.Add(item);
                    break;
                case "1":
                    ToolbarItem item1 = new ToolbarItem
                    {

                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "4",
                        Title = Utility.GetResourceStr("OKCOMEIN"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
                    };
                    items.Add(item1);
                    break;
                case "2":
                    ToolbarItem item2 = new ToolbarItem
                    {

                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "5",
                        Title = Utility.GetResourceStr("CHECKOUTHOUSE"),
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
                    };
                    items.Add(item2);
                    break;
            }
            return items;
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 生成Form上的保存,保存并关闭按钮
        /// </summary>
        /// <returns>按钮列表</returns>
        public static List<ToolbarItem> CreateFormSaveButton()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                // 1s 冉龙军
                //Title = Utility.GetResourceStr("SUBMIT"),// "保存",
                Title = Utility.GetResourceStr("SAVE"),// "保存",
                // 1e
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };

            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                // 1s 冉龙军
                //Title = Utility.GetResourceStr("SUBMITANDCLOSE"),//"保存与关闭"
                Title = Utility.GetResourceStr("SAVEANDCLOSE"),//"保存与关闭"
                // 1e
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
            };

            items.Add(item);

            return items;
        }
Ejemplo n.º 25
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            //ToolbarItem item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "1",
            //    Title = Utility.GetResourceStr("PREVIEW"),
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/(09,24).png"

                
            //};
                        
            //items.Add(item);
            //item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "2",
            //    Title = Utility.GetResourceStr("CHOOSEDISTRBUTEOBJECT"),
            //    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
            //};
            //items.Add(item);
            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("ISSUEDOCUMENT"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };
            items.Add(item);
            

            return items;
        }
Ejemplo n.º 26
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();
            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("SAVEANDCLOSE"),
                ImageUrl = "/SMT.SaaS.Images;Component/Images/ToolBar/16_SaveClose.png"
            };

            items.Add(item);

            //item = new ToolbarItem
            //{
            //    DisplayType = ToolbarItemDisplayTypes.Image,
            //    Key = "0",
            //    Title = Utility.GetResourceStr("SAVE"),
            //    ImageUrl = "/SMT.SaaS.Images;Component/Images/ToolBar/16_SAVE.png"
            //};

            //items.Add(item);
            return items;
        }
Ejemplo n.º 27
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("NOPASSED"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/16_convertactivity.png"
            };
            if (tmpStaff.ISOK != "1")
            {
                items.Add(item);
            }
            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("PASSED"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/16_convertactivity.png"
            };
            if (tmpStaff.ISOK != "2")
            {
                items.Add(item);
            }

            return items;
        }
Ejemplo n.º 28
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item2 = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "2",
                Title = "下载模版",
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/area/18_workrules.png"
            };
            items.Add(item2);

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("IMPORT"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/area/18_import.png"
            };

            items.Add(item);
            return items;
        }
Ejemplo n.º 29
0
        public List<ToolbarItem> GetToolBarItems()
        {
            List<ToolbarItem> items = new List<ToolbarItem>();

            ToolbarItem item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "0",
                Title = Utility.GetResourceStr("CONFIRM"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
            };
            items.Add(item);

            item = new ToolbarItem
            {
                DisplayType = ToolbarItemDisplayTypes.Image,
                Key = "1",
                Title = Utility.GetResourceStr("CANCELBUTTON"),
                ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png"
            };
            items.Add(item);

            return items;
        }
Ejemplo n.º 30
0
        public List<ToolbarItem> GetToolBarItems()
        {
            if (!isDataOK)
            {
                return new List<ToolbarItem>();
            }
            
            bool canSave = true;
            bool canSubmit = true;
            List<ToolbarItem> items = new List<ToolbarItem>();
            switch (this.EditForm.OperationType)
            {
                case OperationTypes.Browse:
                    canSave &= false;
                    canSubmit &= false;
                    break;
                case OperationTypes.Audit:
                    canSave &= false;
                    canSubmit &= false;
                    break;
                case OperationTypes.ReSubmit:
                    canSave = false;
                    canSubmit = true;
                    break;
                case OperationTypes.Add :
                    canSubmit = false;
                    canSave = true;
                    break;
            }
            if (!IsUnSubmit)
            {
                canSave &= false;
                canSubmit &= false;
            }
            else if ((this.OrderEntity.OrderType == typeof(T_FB_DEPTBUDGETSUMMASTER) ||
                     this.OrderEntity.OrderType == typeof(T_FB_COMPANYBUDGETSUMMASTER)))
            {
                canSave &= false;
            }

            if (this.OrderEntity.IsReSubmit)
            {
                object states = this.OrderEntity.GetObjValue(EntityFieldName.CheckStates);
                SMT.FB.UI.FBCommonWS.CheckStates currentStates = CommonFunction.TryConvertValue<SMT.FB.UI.FBCommonWS.CheckStates>(states);
                if (currentStates == FBCommonWS.CheckStates.UnApproved)
                {
                    canSubmit = true;
                }

                if ((currentStates == FBCommonWS.CheckStates.Approved)
                        && (this.OrderEntity.OrderType == typeof(T_FB_DEPTBUDGETAPPLYMASTER) ||
                           this.OrderEntity.OrderType == typeof(T_FB_COMPANYBUDGETAPPLYMASTER)))
                {
                    var isValid = Convert.ToString(this.OrderEntity.Entity.GetObjValue("ISVALID"));
                    if (isValid == "2")
                    {
                        canSubmit = true;
                    }
                }


            }

            if (canSave)
            {
                // items.Add(ToolBarItems.SaveAndClose);
                items.Add(ToolBarItems.Save);
                if (this.EditForm.OperationType != OperationTypes.Add)
                {
                    ToolbarItem item = new ToolbarItem
                    {
                        DisplayType = ToolbarItemDisplayTypes.Image,
                        Key = "Delete",
                        Title = "删除单据",
                        ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
                    };

                    items.Add(item);
                }
            }

            //预算汇总设置不需要提交
            if (this.OrderEntity.OrderType == typeof(T_FB_SUMSETTINGSMASTER))
                canSubmit = false;

            if (canSubmit)
            {
                items.Add(ToolBarItems.Submit);
            }

            return items;
        }