コード例 #1
0
        static public void MOGGlobalToolsLoadReport(MogMainForm mainForm)
        {
            string ReportDir = MOG_ControllerProject.GetUser().GetUserPath() + "\\Reports";

            ListForm report = new ListForm("Load custom user report");

            report.ListListView.SmallImageList = MogUtil_AssetIcons.Images;

            mainForm.MOGOpenFileDialog.Filter           = "Mog Reports | *.rep";
            mainForm.MOGOpenFileDialog.InitialDirectory = ReportDir;
            if (mainForm.MOGOpenFileDialog.ShowDialog(mainForm) == DialogResult.OK)
            {
                report.Show(mainForm);
                report.LoadReportList(mainForm.MOGOpenFileDialog.FileName);
            }
        }
コード例 #2
0
        private void OpenMenu(tb_Sys_Menu menuInfo)
        {
            if (SelecedTabByName(menuInfo.MenuName))
            {
                return;
            }
            //var m = this.MdiChildren.Where(i => i.Text ==menuInfo.MenuName).FirstOrDefault();
            //if (m != null)
            //{
            //    //m.WindowState = FormWindowState.Maximized;
            //    m.Show();
            //    return;
            //}
            if (string.IsNullOrWhiteSpace(menuInfo.NameSpeace))
            {
                return;
            }
            if (menuInfo.MenuName == "权限管理")
            {
                A004_RoleControl frm = new A004_RoleControl();
                frm.MdiParent = this;
                frm.Text      = menuInfo.MenuName;
                frm.Show();
                return;
            }
            Type type = Type.GetType(menuInfo.NameSpeace);

            if (type == null)
            {
                throw new AppException("没有对应的窗体类型,创建失败");
            }
            ListForm     obj       = (ListForm)Activator.CreateInstance(type);
            tb_Sys_Roles rolesData = appCacheService.GetItem("roles") as tb_Sys_Roles;
            //Guid roleId = rolesDataXml.Element("Id").Value.ToGuid();
            var buttonList = buttonService.GetButtonsByMenu(menuInfo.Id, rolesData.Id);

            obj.Text = menuInfo.MenuName;
            obj.Tag  = menuInfo;
            obj.CreateToolBar(buttonList);
            obj.MdiParent = this;
            //obj.WindowState = FormWindowState.Maximized;
            obj.Show();
            //obj.ShowDig(this,menuInfo.MenuName);
        }
コード例 #3
0
        private void 联合查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SelectByAll dialog = new SelectByAll();

            dialog.ShowDialog();
            if (dialog.DialogResult == DialogResult.OK)
            {
                ArrayList result = new ArrayList();

                for (int i = 0; i < dialog.topicStr.Count; i++)
                {
                    string where;
                    if (dialog.yearStr.Length > 0 && dialog.monthStr.Length > 0)
                    {
                        where = "DESC LIKE '%" + dialog.topicStr[i] + "%' AND DATE like '" + dialog.yearStr + "-" + dialog.monthStr + "%'";
                    }
                    else
                    {
                        where = "DESC LIKE '%" + dialog.topicStr[i] + "%'";
                    }
                    ArrayList t = DBHelper.queryAll(where);
                    result.AddRange(t);
                }


                if (result.Count <= 0)
                {
                    MessageBox.Show("未找到");
                    return;
                }/*
                  * for (int i = 0; i < result.Count; i++)
                  * {
                  * MessageBox.Show(((NameAndType)result[i]).name + "");
                  * }*/
                ListForm resultDialog = new ListForm(result, m_mapControl);
                resultDialog.Show();
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: masakura/FormUnitTest
        private void listButton_Click(object sender, EventArgs e)
        {
            var form = new ListForm();

            form.Show(this);
        }
コード例 #5
0
ファイル: DIMainForm.cs プロジェクト: crashr42/Health
 private void просмотрToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var listForm = new ListForm<ParameterDetail>(DIKernel);
     listForm.MdiParent = this;
     listForm.LoadData = DIKernel.Get<ParameterRepository>().GetAll;
     listForm.InitializeOperations();
     listForm.Show();
     listForm.Activate();
 }