Exemplo n.º 1
0
        private void btnstat_Click(object sender, EventArgs e)
        {
            ztinfo zt   = (ztinfo)cmbZtLst.SelectedItem;
            int    ztid = zt.ID;

            strDbType = zt.DbType;
            strZtID   = ztid.ToString();
            frmstat st = new frmstat(zt.Name, ztid, strDbType);

            st.MdiParent   = this.MdiParent;
            st.WindowState = FormWindowState.Maximized;
            st.Show();
            this.Close();
        }
Exemplo n.º 2
0
        private void btnST_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要统计分析的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string          name    = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string          des     = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string          type    = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int             id      = Convert.ToInt32(datarow.Cells["id"].Value.ToString());
            frmstat         st      = new frmstat(name, id, type);

            //frmstat st = new frmstat();
            st.MdiParent = this.MdiParent;
            st.Show();
        }
Exemplo n.º 3
0
 private void 统计分析ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form form in this.MdiChildren)
     {
         if (form is frmstat)
         {
             form.Show();
             return;
         }
     }
     if (MDIMain.Ztname != null)
     {
         frmstat st = new frmstat(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
         st.MdiParent   = this;
         st.WindowState = FormWindowState.Maximized;
         st.Show();
     }
     else
     {
         MessageBox.Show("请先选择专题库", "提示");
     }
 }
Exemplo n.º 4
0
        private void btnST_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要统计分析的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }




            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string name = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string des = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string type = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int id = Convert.ToInt32(datarow.Cells["Id"].Value.ToString());


            if (MDIMain.Ztid != id && MDIMain.Ztid != 0)
            {
                if (MessageBox.Show(string.Format("您正在使用专题库:【{0}】,{1}是:关闭现有专题库,打开新专题库【{2}】{1}否:继续使用当前专题库:【{0}】", MDIMain.Ztname, Environment.NewLine, name), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    //关闭所有页面
                    foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
                    {
                        if (form is ZTListNew)
                        {
                            continue;
                        }
                        else
                        {
                            form.Close();
                        }
                    }
                    //切换专题库
                   // inifilter(id);
                    MDIMain.Ztid = id;
                    MDIMain.Ztname = name;
                    MDIMain.Dbtype = type;
                    ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
                }
            }
            else
            {
                //inifilter(id);
                MDIMain.Ztid = id;
                MDIMain.Ztname = name;
                MDIMain.Dbtype = type;
                ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
            }

            foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
            {
                if (form is frmstat)
                {
                    form.Activate();

                    this.Close();
                    return;
                }
            }

            frmstat st = new frmstat(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
            st.MdiParent = this.MdiParent;
            st.WindowState = FormWindowState.Maximized;
            st.Show();
            this.Close();


        }
Exemplo n.º 5
0
 private void btnstat_Click(object sender, EventArgs e)
 {
     ztinfo zt = (ztinfo)cmbZtLst.SelectedItem;
     int ztid = zt.ID;
     strDbType = zt.DbType;
     strZtID = ztid.ToString();
     frmstat st = new frmstat(zt.Name, ztid, strDbType);
     st.MdiParent = this.MdiParent;
     st.WindowState = FormWindowState.Maximized;
     st.Show();
     this.Close();
 }
Exemplo n.º 6
0
        private void btnST_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要统计分析的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }



            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string          name    = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string          des     = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string          type    = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int             id      = Convert.ToInt32(datarow.Cells["Id"].Value.ToString());


            if (MDIMain.Ztid != id && MDIMain.Ztid != 0)
            {
                if (MessageBox.Show(string.Format("您正在使用专题库:【{0}】,{1}是:关闭现有专题库,打开新专题库【{2}】{1}否:继续使用当前专题库:【{0}】", MDIMain.Ztname, Environment.NewLine, name), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    //关闭所有页面
                    foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
                    {
                        if (form is ZTListNew)
                        {
                            continue;
                        }
                        else
                        {
                            form.Close();
                        }
                    }
                    //切换专题库
                    // inifilter(id);
                    MDIMain.Ztid   = id;
                    MDIMain.Ztname = name;
                    MDIMain.Dbtype = type;
                    ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
                }
            }
            else
            {
                //inifilter(id);
                MDIMain.Ztid   = id;
                MDIMain.Ztname = name;
                MDIMain.Dbtype = type;
                ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
            }

            foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
            {
                if (form is frmstat)
                {
                    form.Activate();

                    this.Close();
                    return;
                }
            }

            frmstat st = new frmstat(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);

            st.MdiParent   = this.MdiParent;
            st.WindowState = FormWindowState.Maximized;
            st.Show();
            this.Close();
        }
Exemplo n.º 7
0
        private void 统计分析ToolStripMenuItem_Click(object sender, EventArgs e)
        {

            foreach (Form form in this.MdiChildren)
            {
                if (form is frmstat)
                {
                    form.Show();
                    return;
                }
            }
            if (MDIMain.Ztname != null)
            {
                frmstat st = new frmstat(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
                st.MdiParent = this;
                st.WindowState = FormWindowState.Maximized;
                st.Show();
            }
            else
            {
                MessageBox.Show("请先选择专题库", "提示");
            }
        }