コード例 #1
0
ファイル: AuditPrint.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption = "打印",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand setCommand = new MyCommand(setQZID)
            {
                Caption = "设置签证号",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand saveQZIDCommand = new MyCommand(saveQZID)
            {
                Caption = "保存签证号码",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand printTable4Command = new MyCommand(printTable4)
            {
                Caption = "打印表四",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand showAllSendNoCommand = new MyCommand(showAllSendNo)
            {
                Caption = "显示所有签证",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(setCommand);
            clipboardBar.Commands.Add(saveQZIDCommand);
            clipboardBar.Commands.Add(printTable4Command);
            clipboardBar.Commands.Add(showAllSendNoCommand);
        }
コード例 #2
0
ファイル: UserAdmin.xaml.cs プロジェクト: elths/GXVisa
        //void InitmenuList()
        //{
        //    menuList = visaORM.TB_Menu.Where(m=>m.FStatus==true).ToList();
        //}
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(UserAdd)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(UserDel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(UserSave)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            if (MainContext.UserCompanyName.ToUpper() == "ADMIN")
            {
            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            }
            clipboardBar.Commands.Add(saveCommand);
            DataContext = viewModel;
        }
コード例 #3
0
ファイル: CountryAdmin.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(NewModel)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(DelModel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(SaveModel)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            DataContext = viewModel;
        }
コード例 #4
0
ファイル: VisaSubmit.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand prevCommand = new MyCommand(submitVisa)
            {
                Caption = "提交签证申请",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption = "打印名单号签证列表(表1)",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshSubmit)
            {
                Caption = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(prevCommand);
            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }
コード例 #5
0
ファイル: Report3.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(exportCommand);

            DataContext = viewModel;
        }
コード例 #6
0
ファイル: BlackList.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand prevCommand = new MyCommand(CustomerPrev)
            {
                Caption = "上一份",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand nextCommand = new MyCommand(CustomerNext)
            {
                Caption = "下一份",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand addCommand = new MyCommand(CustomerAdd)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(CustomerDel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(CustomerSave)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            //MyCommand copyCommand = new MyCommand(null) { Caption = "Copy", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Copy_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Copy_16x16.png") };

            clipboardBar.Commands.Add(prevCommand);
            clipboardBar.Commands.Add(nextCommand);
            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            //MyGroupCommand addGroupCommand = new MyGroupCommand() { Caption = "Add", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //MyParentCommand parentCommand = new MyParentCommand(viewModel, MyParentCommandType.CommandCreation) { Caption = "Add Command", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //MyParentCommand parentBar = new MyParentCommand(viewModel, MyParentCommandType.BarCreation) { Caption = "Add Bar", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //addGroupCommand.Commands.Add(parentCommand);
            //addGroupCommand.Commands.Add(parentBar);
            //addingBar.Commands.Add(addGroupCommand);
            //addingBar.Commands.Add(parentCommand);
            //addingBar.Commands.Add(parentBar);

            DataContext = viewModel;
        }
コード例 #7
0
ファイル: AuditSent.xaml.cs プロジェクト: elths/GXVisa
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(newList)
            {
                Caption = "新建报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand sendCommand = new MyCommand(SendList)
            {
                Caption = "提交报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshList)
            {
                Caption = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(newCommand);
            clipboardBar.Commands.Add(sendCommand);
            clipboardBar.Commands.Add(exportCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }