Exemplo n.º 1
0
 public frmGroup(GridControl dv, string flag)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.dvgroup = (DataView)dv.DataSource;
     this.BindCombox();
     this.comboBox1.SelectedIndex = 0;
     this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     this.dataGridView1.ReadOnly = true;
     this.dataGridView1.AllowUserToAddRows = false;
     this.dataGridView1.AllowUserToDeleteRows = false;
     this.dataGridView1.AllowUserToResizeRows = false;
     this.dataGridView1.MultiSelect = false;
     this.dataGridView1.RowHeadersWidth = 55;
     this.dataGridView1.BackgroundColor = this.BackColor;
     this.dataGridView1.EnableHeadersVisualStyles = false;
     this.dataGridView1.AllowUserToResizeColumns = false;
     this.dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
     this.dataGridView2.ReadOnly = true;
     this.dataGridView2.AllowUserToAddRows = false;
     this.dataGridView2.AllowUserToDeleteRows = false;
     this.dataGridView2.AllowUserToResizeRows = false;
     this.dataGridView2.MultiSelect = false;
     this.dataGridView2.RowHeadersWidth = 55;
     this.dataGridView2.BackgroundColor = this.BackColor;
     this.dataGridView2.EnableHeadersVisualStyles = false;
 }
Exemplo n.º 2
0
        public frmGroup(GridControl dv, string flag)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.dvgroup = (DataView)dv.DataSource;
            this.BindCombox();
            this.comboBox1.SelectedIndex                 = 0;
            this.dataGridView1.SelectionMode             = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridView1.ReadOnly                  = true;
            this.dataGridView1.AllowUserToAddRows        = false;
            this.dataGridView1.AllowUserToDeleteRows     = false;
            this.dataGridView1.AllowUserToResizeRows     = false;
            this.dataGridView1.MultiSelect               = false;
            this.dataGridView1.RowHeadersWidth           = 55;
            this.dataGridView1.BackgroundColor           = this.BackColor;
            this.dataGridView1.EnableHeadersVisualStyles = false;
            this.dataGridView1.AllowUserToResizeColumns  = false;
            this.dataGridView2.SelectionMode             = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridView2.ReadOnly                  = true;
            this.dataGridView2.AllowUserToAddRows        = false;
            this.dataGridView2.AllowUserToDeleteRows     = false;
            this.dataGridView2.AllowUserToResizeRows     = false;
            this.dataGridView2.MultiSelect               = false;
            this.dataGridView2.RowHeadersWidth           = 55;
            this.dataGridView2.BackgroundColor           = this.BackColor;
            this.dataGridView2.EnableHeadersVisualStyles = false;
        }
Exemplo n.º 3
0
        public frmQYDetail(string strF2, string strF8, string strF14)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            DataRow[] array = MDIParent.dsF.Tables["F"].Select(string.Concat(new string[]
            {
                "F2='",
                strF2,
                "'",
                (strF8 == "") ? "" : (" and F8='" + strF8 + "'"),
                (strF14 == "") ? "" : (" and F14='" + strF14 + "'")
            }));
            this.txtDWMC.Text       = array[0]["F2"].ToString();
            this.txtCountry.Text    = array[0]["F3"].ToString();
            this.txtProvince.Text   = array[0]["F4"].ToString();
            this.txtCity.Text       = array[0]["F5"].ToString();
            this.txtCounty.Text     = array[0]["F6"].ToString();
            this.txtAddress.Text    = array[0]["F7"].ToString();
            this.txtPostalcode.Text = array[0]["F11"].ToString();
            this.txtPhone.Text      = array[0]["F9"].ToString();
            this.txtFax.Text        = array[0]["F10"].ToString();
            this.txtLXR.Text        = array[0]["F14"].ToString();
            this.txtEmail.Text      = array[0]["F12"].ToString();
            this.txtEmail.Text      = array[0]["F13"].ToString();
            this.txtDWLB.Text       = array[0]["F8"].ToString();
        }
Exemplo n.º 4
0
 public frmHao(string flag)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.strflag = flag;
 }
Exemplo n.º 5
0
 public frmSYDW()
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.userManu1.navBarItem17.Appearance.ForeColor = Color.FromArgb(177, 81, 28);
 }
Exemplo n.º 6
0
 public frmQYDetail(string strF2, string strF8, string strF14)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     DataRow[] array = MDIParent.dsF.Tables["F"].Select(string.Concat(new string[]
     {
         "F2='",
         strF2,
         "'",
         (strF8 == "") ? "" : (" and F8='" + strF8 + "'"),
         (strF14 == "") ? "" : (" and F14='" + strF14 + "'")
     }));
     this.txtDWMC.Text = array[0]["F2"].ToString();
     this.txtCountry.Text = array[0]["F3"].ToString();
     this.txtProvince.Text = array[0]["F4"].ToString();
     this.txtCity.Text = array[0]["F5"].ToString();
     this.txtCounty.Text = array[0]["F6"].ToString();
     this.txtAddress.Text = array[0]["F7"].ToString();
     this.txtPostalcode.Text = array[0]["F11"].ToString();
     this.txtPhone.Text = array[0]["F9"].ToString();
     this.txtFax.Text = array[0]["F10"].ToString();
     this.txtLXR.Text = array[0]["F14"].ToString();
     this.txtEmail.Text = array[0]["F12"].ToString();
     this.txtEmail.Text = array[0]["F13"].ToString();
     this.txtDWLB.Text = array[0]["F8"].ToString();
 }
Exemplo n.º 7
0
        public frmHao(string flag)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.strflag = flag;
        }
Exemplo n.º 8
0
 public frmZD2JJ()
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.SetGridControl();
     this.userManu1.navBarItem23.Appearance.ForeColor = Color.FromArgb(177, 81, 28);
 }
Exemplo n.º 9
0
        public frmNYLB2YXCF()
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.SetGridControl();
            this.userManu1.navBarItem24.Appearance.ForeColor = Color.FromArgb(177, 81, 28);
        }
Exemplo n.º 10
0
 public frmFilter(GridColumnCollection dcl)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.filtertype = "OTHER";
     this.tempdcl = dcl;
     base.Height -= 120;
     this.grpNY.Visible = false;
 }
Exemplo n.º 11
0
        public frmYXCFDetail(string strE2, string strE3)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            string filterExpression;

            if (strE3.Length <= 0)
            {
                filterExpression = "E2='" + strE2 + "'";
            }
            else
            {
                filterExpression = string.Concat(new string[]
                {
                    "E2='",
                    strE2,
                    "' and E3='",
                    strE3,
                    "'"
                });
            }
            DataRow[] array = MDIParent.dsAED.Tables["AED"].Select(filterExpression);
            this.strE1          = array[0]["E1"].ToString();
            this.strLHXZ        = array[0]["E9"].ToString().Trim();
            this.strDX          = array[0]["E16"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E17"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E18"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E15"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E13"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E14"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E23"].ToString().Trim();
            this.strDX          = this.strDX + "|" + array[0]["E24"].ToString().Trim();
            this.strZYTD        = array[0]["E12"].ToString().Trim();
            this.strHJ          = array[0]["E25"].ToString().Trim();
            this.strHJ          = this.strHJ + "|" + array[0]["E26"].ToString().Trim();
            this.strHJ          = this.strHJ + "|" + array[0]["E27"].ToString().Trim();
            this.strHJ          = this.strHJ + "|" + array[0]["E28"].ToString().Trim();
            this.strJXY         = array[0]["E19"].ToString().Trim();
            this.strJXY         = this.strJXY + "|" + array[0]["E20"].ToString().Trim();
            this.strJXY         = this.strJXY + "|" + array[0]["E21"].ToString().Trim();
            this.txtChTYMC.Text = array[0]["E2"].ToString();
            this.txtChBM.Text   = array[0]["E4"].ToString();
            this.txtEnTYMC.Text = array[0]["E3"].ToString();
            this.txtEnBM.Text   = array[0]["E5"].ToString();
            this.txtFZS.Text    = array[0]["E6"].ToString();
            this.txtCADJH.Text  = array[0]["E8"].ToString();
            this.txtZYFS.Text   = array[0]["E11"].ToString();
            this.txtHXMC.Text   = array[0]["E7"].ToString();
            this.txtFXFF.Text   = array[0]["E10"].ToString();
            this.txtNYLB.Text   = array[0]["E29"].ToString();
            this.txtHXFL.Text   = array[0]["E30"].ToString();
            this.txtZYSX.Text   = array[0]["E18"].ToString();
        }
Exemplo n.º 12
0
        public frmFilter(GridColumnCollection dcl)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.filtertype    = "OTHER";
            this.tempdcl       = dcl;
            base.Height       -= 120;
            this.grpNY.Visible = false;
        }
Exemplo n.º 13
0
 public frmFilter(string FilterType)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.filtertype = FilterType;
     if (!(FilterType == "NY"))
     {
         base.Height -= 120;
         this.grpNY.Visible = false;
     }
 }
Exemplo n.º 14
0
 public frmYXCFDetail(string strE2, string strE3)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     string filterExpression;
     if (strE3.Length <= 0)
     {
         filterExpression = "E2='" + strE2 + "'";
     }
     else
     {
         filterExpression = string.Concat(new string[]
         {
             "E2='",
             strE2,
             "' and E3='",
             strE3,
             "'"
         });
     }
     DataRow[] array = MDIParent.dsAED.Tables["AED"].Select(filterExpression);
     this.strE1 = array[0]["E1"].ToString();
     this.strLHXZ = array[0]["E9"].ToString().Trim();
     this.strDX = array[0]["E16"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E17"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E18"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E15"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E13"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E14"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E23"].ToString().Trim();
     this.strDX = this.strDX + "|" + array[0]["E24"].ToString().Trim();
     this.strZYTD = array[0]["E12"].ToString().Trim();
     this.strHJ = array[0]["E25"].ToString().Trim();
     this.strHJ = this.strHJ + "|" + array[0]["E26"].ToString().Trim();
     this.strHJ = this.strHJ + "|" + array[0]["E27"].ToString().Trim();
     this.strHJ = this.strHJ + "|" + array[0]["E28"].ToString().Trim();
     this.strJXY = array[0]["E19"].ToString().Trim();
     this.strJXY = this.strJXY + "|" + array[0]["E20"].ToString().Trim();
     this.strJXY = this.strJXY + "|" + array[0]["E21"].ToString().Trim();
     this.txtChTYMC.Text = array[0]["E2"].ToString();
     this.txtChBM.Text = array[0]["E4"].ToString();
     this.txtEnTYMC.Text = array[0]["E3"].ToString();
     this.txtEnBM.Text = array[0]["E5"].ToString();
     this.txtFZS.Text = array[0]["E6"].ToString();
     this.txtCADJH.Text = array[0]["E8"].ToString();
     this.txtZYFS.Text = array[0]["E11"].ToString();
     this.txtHXMC.Text = array[0]["E7"].ToString();
     this.txtFXFF.Text = array[0]["E10"].ToString();
     this.txtNYLB.Text = array[0]["E29"].ToString();
     this.txtHXFL.Text = array[0]["E30"].ToString();
     this.txtZYSX.Text = array[0]["E18"].ToString();
 }
Exemplo n.º 15
0
        private string checkVolName()
        {
            DataSet dataSet = new DataSet();

            dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema);
            string text  = dataSet.Tables["t1"].Rows[0]["c2"].ToString();
            clsMe  clsMe = new clsMe();

            text = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default);
            text = text.Substring(0, text.IndexOf("%"));
            return(text.CompareTo(clsMe.GetVolumeID()).ToString());
        }
Exemplo n.º 16
0
        public DataTable GetFileData(string strFileName)
        {
            DataSet        dataSet        = new DataSet();
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();

            clsMe.GetFile(Directory.GetCurrentDirectory() + "\\" + strFileName + ".dat", Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip");
            clsCompression.UnZipFile(Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip", Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml");
            dataSet.ReadXml(Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml", XmlReadMode.ReadSchema);
            File.Delete(Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip");
            File.Delete(Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml");
            return(dataSet.Tables[0]);
        }
Exemplo n.º 17
0
        public frmFilter(string FilterType)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.filtertype = FilterType;
            if (!(FilterType == "NY"))
            {
                base.Height       -= 120;
                this.grpNY.Visible = false;
            }
        }
Exemplo n.º 18
0
 private void pictureBox_view_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmView frmView = new frmView(this.gridView1.Columns);
         frmView.ShowDialog();
         clsMe clsMe = new clsMe();
         clsMe.ViewGrid(this.gridView1, frmView.listbox);
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再视图显示!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 19
0
 public frmSort(GridColumnCollection dcl)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.BindCombox1(dcl);
     this.BindCombox2(dcl);
     this.BindCombox3(dcl);
     this.BindCombox4(dcl);
     this.comboBox1.SelectedIndex = 0;
     this.comboBox2.SelectedIndex = 0;
     this.comboBox3.SelectedIndex = 0;
     this.comboBox4.SelectedIndex = 0;
     this.fillfinishok = true;
 }
Exemplo n.º 20
0
        public frmSort(GridColumnCollection dcl)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.BindCombox1(dcl);
            this.BindCombox2(dcl);
            this.BindCombox3(dcl);
            this.BindCombox4(dcl);
            this.comboBox1.SelectedIndex = 0;
            this.comboBox2.SelectedIndex = 0;
            this.comboBox3.SelectedIndex = 0;
            this.comboBox4.SelectedIndex = 0;
            this.fillfinishok            = true;
        }
Exemplo n.º 21
0
 private void pictureBox_sort_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmSort frmSort = new frmSort(this.gridView1.Columns);
         frmSort.ShowDialog();
         clsMe clsMe = new clsMe();
         if (frmSort.SortColumn.Length > 0)
         {
             clsMe.SortView(this.gridControl1, frmSort.SortColumn);
         }
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再排序!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 22
0
        private void initT14()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\t14.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\t14.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\t14.xml";
            DataSet        dataSet        = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            frmTJSY.dsT14.ReadXmlSchema(text2);
            frmTJSY.dsT14.ReadXml(text2, XmlReadMode.IgnoreSchema);
            clsMe.PlanData(frmTJSY.dsT14, "T14", "BH|CPMC|QYMC|");
            File.Delete(text);
            File.Delete(text2);
        }
Exemplo n.º 23
0
        private void initT15()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\t15.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\t15.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\t15.xml";
            DataSet        dataSet        = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            this.dsT15.ReadXmlSchema(text2);
            this.dsT15.ReadXml(text2, XmlReadMode.IgnoreSchema);
            clsMe.PlanData(this.dsT15, "T15", "CPMC|FMISPCNAME|");
            File.Delete(text);
            File.Delete(text2);
        }
Exemplo n.º 24
0
 private void pictureBox_filter_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmFilter frmFilter = new frmFilter(this.gridView1.Columns);
         frmFilter.ShowDialog();
         clsMe clsMe = new clsMe();
         if (frmFilter.FilterColumn.Length > 0)
         {
             clsMe.FilterView(this.gridControl1, frmFilter.FilterColumn);
         }
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再过滤!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 25
0
        private void initF()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\Firm.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\JGS\\Firm.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\JGS\\Firm.xml";
            DataSet        dataSet        = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            MDIParent.dsF.ReadXmlSchema(text2);
            MDIParent.dsF.ReadXml(text2, XmlReadMode.IgnoreSchema);
            clsMe.PlanData(MDIParent.dsF, "f", "F2|F9|F10|F14|");
            File.Delete(text);
            File.Delete(text2);
            this.SetPicWidth(100);
            this.SetProgressBar1(10);
        }
Exemplo n.º 26
0
        private void initAED()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\ActiveElementDetail.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\JGS\\ActiveElementDetail.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\JGS\\ActiveElementDetail.xml";
            DataSet        dataSet        = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            MDIParent.dsAED.ReadXmlSchema(text2);
            MDIParent.dsAED.ReadXml(text2, XmlReadMode.IgnoreSchema);
            clsMe.PlanData(MDIParent.dsAED, "aed", "E2|E3|");
            File.Delete(text);
            File.Delete(text2);
            this.SetPicWidth(100);
            this.SetProgressBar1(5);
        }
Exemplo n.º 27
0
        private void initBQ()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\bq.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\JGS\\bq.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\JGS\\bq.xml";
            DataSet        dataSet        = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            MDIParent.dsBQ.ReadXmlSchema(text2);
            MDIParent.dsBQ.ReadXml(text2, XmlReadMode.IgnoreSchema);
            clsMe.PlanData(MDIParent.dsBQ, "BQ", "R1|R2|");
            File.Delete(text);
            File.Delete(text2);
            this.SetPicWidth(180);
            this.SetProgressBar1(45);
        }
Exemplo n.º 28
0
        public frmTJSYSPXX(string strZLBH)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            clsStr    clsStr    = new clsStr();
            clsCommon clsCommon = new clsCommon();

            this.initT14();
            DataRow[] array = this.dsT14.Tables["t14"].Select("BH='" + strZLBH + "'");
            this.lblQYMC.Text = array[0]["QYMC"].ToString() + ":";
            this.strCPMC      = array[0]["CPMC"].ToString();
            this.strCPBM      = array[0]["CPBM"].ToString();
            DataTable dataTable = new DataTable();

            dataTable.TableName = "Result";
            dataTable.Columns.Add("ZW");
            dataTable.Columns.Add("FZDX");
            dataTable.Columns.Add("SPZT");
            string[] array2 = clsStr.Seperate(array[0]["ZW"].ToString(), '|');
            string[] array3 = clsStr.Seperate(array[0]["FZDX"].ToString(), '|');
            string[] array4 = clsStr.Seperate(array[0]["SPZT"].ToString(), '|');
            for (int i = 0; i < array2.Length; i++)
            {
                if (!(array2[i].ToString() == "") || !(array3[i].ToString() == ""))
                {
                    DataRow dataRow = dataTable.NewRow();
                    dataRow["ZW"]   = array2[i];
                    dataRow["FZDX"] = array3[i];
                    string text = array4[i];
                    if (text != null)
                    {
                        if (text == "1")
                        {
                            dataRow["SPZT"] = "同意";
                        }
                    }
                    dataTable.Rows.Add(dataRow);
                }
            }
            this.grvZWFZDXSPXX.DataSource = dataTable;
        }
Exemplo n.º 29
0
 public frmTJSYSPXX(string strZLBH)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     clsStr clsStr = new clsStr();
     clsCommon clsCommon = new clsCommon();
     this.initT14();
     DataRow[] array = this.dsT14.Tables["t14"].Select("BH='" + strZLBH + "'");
     this.lblQYMC.Text = array[0]["QYMC"].ToString() + ":";
     this.strCPMC = array[0]["CPMC"].ToString();
     this.strCPBM = array[0]["CPBM"].ToString();
     DataTable dataTable = new DataTable();
     dataTable.TableName = "Result";
     dataTable.Columns.Add("ZW");
     dataTable.Columns.Add("FZDX");
     dataTable.Columns.Add("SPZT");
     string[] array2 = clsStr.Seperate(array[0]["ZW"].ToString(), '|');
     string[] array3 = clsStr.Seperate(array[0]["FZDX"].ToString(), '|');
     string[] array4 = clsStr.Seperate(array[0]["SPZT"].ToString(), '|');
     for (int i = 0; i < array2.Length; i++)
     {
         if (!(array2[i].ToString() == "") || !(array3[i].ToString() == ""))
         {
             DataRow dataRow = dataTable.NewRow();
             dataRow["ZW"] = array2[i];
             dataRow["FZDX"] = array3[i];
             string text = array4[i];
             if (text != null)
             {
                 if (text == "1")
                 {
                     dataRow["SPZT"] = "同意";
                 }
             }
             dataTable.Rows.Add(dataRow);
         }
     }
     this.grvZWFZDXSPXX.DataSource = dataTable;
 }
Exemplo n.º 30
0
 public frmView(GridColumnCollection dcl)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     for (int i = 0; i < dcl.Count; i++)
     {
         if (dcl[i].Visible)
         {
             this.listBox2.Items.Add(dcl[i].Caption);
         }
         else
         {
             this.listBox1.Items.Add(dcl[i].Caption);
         }
     }
     this.listBox2.SelectedIndex = this.listBox2.Items.Count - 1;
     if (this.listBox1.Items.Count > 0)
     {
         this.listBox1.SelectedIndex = this.listBox1.Items.Count - 1;
     }
 }
Exemplo n.º 31
0
        private void initP()
        {
            clsMe          clsMe          = new clsMe();
            clsCompression clsCompression = new clsCompression();
            string         strFromFile    = Directory.GetCurrentDirectory() + "\\P.dat";
            string         text           = Directory.GetCurrentDirectory() + "\\JGS\\P.zip";
            string         text2          = Directory.GetCurrentDirectory() + "\\JGS\\P.xml";
            string         text3          = text2.Substring(0, 1);

            if (!text3.EndsWith(":\\"))
            {
                text3 += ":\\";
            }
            ulong num;
            ulong num2;
            ulong num3;

            MDIParent.GetDiskFreeSpaceEx(text3, out num, out num2, out num3);
            if (num <= 100000000uL)
            {
                MessageBox.Show(this, "对不起,由于当前盘符[" + text3 + "]剩余空间不足,程序不能继续运行!\r\n您可以清理一下当前盘符,释放一些空间!\r\n或者重装到剩余空间大一点的盘符下!", "错误提示");
                Application.Exit();
            }
            DataSet dataSet = new DataSet();

            clsMe.GetFile(strFromFile, text);
            clsCompression.UnZipFile(text, text2);
            if (MDIParent.dsP.Tables.Count == 0)
            {
                MDIParent.dsP.ReadXmlSchema(text2);
                MDIParent.dsP.ReadXml(text2, XmlReadMode.IgnoreSchema);
            }
            clsMe.PlanData(MDIParent.dsP, "p", "R1|R2|F2|R4|R5|R11|R12|R13|");
            File.Delete(text);
            File.Delete(text2);
            this.SetPicWidth(169);
            this.SetProgressBar1(30);
        }
Exemplo n.º 32
0
        public frmView(GridColumnCollection dcl)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            for (int i = 0; i < dcl.Count; i++)
            {
                if (dcl[i].Visible)
                {
                    this.listBox2.Items.Add(dcl[i].Caption);
                }
                else
                {
                    this.listBox1.Items.Add(dcl[i].Caption);
                }
            }
            this.listBox2.SelectedIndex = this.listBox2.Items.Count - 1;
            if (this.listBox1.Items.Count > 0)
            {
                this.listBox1.SelectedIndex = this.listBox1.Items.Count - 1;
            }
        }
Exemplo n.º 33
0
        public frmNYDetail(string strR1, string strF8, string strF14)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            this.strF8  = strF8;
            this.strF14 = strF14;
            clsStr clsStr = new clsStr();

            DataRow[] array = MDIParent.dsP.Tables["P"].Select("R1='" + strR1 + "'");
            this.txtDJZH.Text   = array[0]["R1"].ToString();
            this.txtYXQSRQ.Text = array[0]["R4"].ToString();
            this.txtYXJZRQ.Text = array[0]["R5"].ToString();
            this.txtDJMC.Text   = array[0]["R2"].ToString();
            this.txtDX.Text     = array[0]["R11"].ToString();
            this.txtJX.Text     = array[0]["R13"].ToString();
            this.txtDWMC.Text   = array[0]["F2"].ToString();
            this.txtNYLB.Text   = array[0]["R12"].ToString();
            this.txtXKZH.Text   = array[0]["R80"].ToString();
            this.txtQYBZ.Text   = array[0]["R90"].ToString();
            DataTable dataTable = new DataTable();

            dataTable.TableName = "Result1";
            dataTable.Columns.Add("E2");
            dataTable.Columns.Add("E3");
            dataTable.Columns.Add("R7");
            string[] array2 = clsStr.Seperate(array[0]["E2"].ToString(), '、');
            string[] array3 = clsStr.Seperate(array[0]["E3"].ToString(), '、');
            string[] array4 = clsStr.Seperate(array[0]["R7"].ToString(), '、');
            for (int i = 0; i < array2.Length; i++)
            {
                DataRow dataRow = dataTable.NewRow();
                dataRow["E2"] = array2[i];
                dataRow["E3"] = array3[i];
                dataRow["R7"] = array4[i];
                dataTable.Rows.Add(dataRow);
            }
            this.grvYXCF.DataSource = dataTable;
            DataTable dataTable2 = new DataTable();

            dataTable2.TableName = "Result2";
            dataTable2.Columns.Add("C2");
            dataTable2.Columns.Add("T2");
            dataTable2.Columns.Add("R10");
            dataTable2.Columns.Add("R14");
            string[] array5 = clsStr.Seperate(array[0]["C2"].ToString(), '|');
            string[] array6 = clsStr.Seperate(array[0]["T2"].ToString(), '|');
            string[] array7 = clsStr.Seperate(array[0]["R10"].ToString(), '|');
            string[] array8 = clsStr.Seperate(array[0]["R14"].ToString(), '|');
            for (int i = 0; i < array5.Length; i++)
            {
                if (!(array5[i].ToString() == "") || !(array6[i].ToString() == ""))
                {
                    DataRow dataRow = dataTable2.NewRow();
                    dataRow["C2"]  = array5[i];
                    dataRow["T2"]  = array6[i];
                    dataRow["R10"] = array7[i];
                    dataRow["R14"] = array8[i];
                    dataTable2.Rows.Add(dataRow);
                }
            }
            this.grvZWFZDX.DataSource = dataTable2;
            this.pages = ((DataTable)this.grvZWFZDX.DataSource).Rows.Count / (this.pagesize + 1);
            if (this.pages * (this.pagesize + 1) != ((DataTable)this.grvZWFZDX.DataSource).Rows.Count)
            {
                this.pages++;
            }
        }
Exemplo n.º 34
0
 private void initT14()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\t14.dat";
     string text = Directory.GetCurrentDirectory() + "\\t14.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\t14.xml";
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     frmTJSY.dsT14.ReadXmlSchema(text2);
     frmTJSY.dsT14.ReadXml(text2, XmlReadMode.IgnoreSchema);
     clsMe.PlanData(frmTJSY.dsT14, "T14", "BH|CPMC|QYMC|");
     File.Delete(text);
     File.Delete(text2);
 }
Exemplo n.º 35
0
 private void pictureBox_sort_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmSort frmSort = new frmSort(this.gridView1.Columns);
         frmSort.ShowDialog();
         clsMe clsMe = new clsMe();
         if (frmSort.SortColumn.Length > 0)
         {
             clsMe.SortView(this.gridControl1, frmSort.SortColumn);
         }
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再排序!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 36
0
 private void initP()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\P.dat";
     string text = Directory.GetCurrentDirectory() + "\\JGS\\P.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\JGS\\P.xml";
     string text3 = text2.Substring(0, 1);
     if (!text3.EndsWith(":\\"))
     {
         text3 += ":\\";
     }
     ulong num;
     ulong num2;
     ulong num3;
     MDIParent.GetDiskFreeSpaceEx(text3, out num, out num2, out num3);
     if (num <= 100000000uL)
     {
         MessageBox.Show(this, "对不起,由于当前盘符[" + text3 + "]剩余空间不足,程序不能继续运行!\r\n您可以清理一下当前盘符,释放一些空间!\r\n或者重装到剩余空间大一点的盘符下!", "错误提示");
         Application.Exit();
     }
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     if (MDIParent.dsP.Tables.Count == 0)
     {
         MDIParent.dsP.ReadXmlSchema(text2);
         MDIParent.dsP.ReadXml(text2, XmlReadMode.IgnoreSchema);
     }
     clsMe.PlanData(MDIParent.dsP, "p", "R1|R2|F2|R4|R5|R11|R12|R13|");
     File.Delete(text);
     File.Delete(text2);
     this.SetPicWidth(169);
     this.SetProgressBar1(30);
 }
Exemplo n.º 37
0
 private void initBQ()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\bq.dat";
     string text = Directory.GetCurrentDirectory() + "\\JGS\\bq.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\JGS\\bq.xml";
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     MDIParent.dsBQ.ReadXmlSchema(text2);
     MDIParent.dsBQ.ReadXml(text2, XmlReadMode.IgnoreSchema);
     clsMe.PlanData(MDIParent.dsBQ, "BQ", "R1|R2|");
     File.Delete(text);
     File.Delete(text2);
     this.SetPicWidth(180);
     this.SetProgressBar1(45);
 }
Exemplo n.º 38
0
 private string checkVolName()
 {
     DataSet dataSet = new DataSet();
     dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema);
     string text = dataSet.Tables["t1"].Rows[0]["c2"].ToString();
     clsMe clsMe = new clsMe();
     text = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default);
     text = text.Substring(0, text.IndexOf("%"));
     return text.CompareTo(clsMe.GetVolumeID()).ToString();
 }
Exemplo n.º 39
0
        private void frmHao_Load(object sender, EventArgs e)
        {
            clsMe  clsMe  = new clsMe();
            Random random = new Random(DateTime.Now.Millisecond);
            int    num    = random.Next(10);
            string text   = "";

            if (num == 0)
            {
                text = "A";
            }
            if (num == 1)
            {
                text = "B";
            }
            if (num == 2)
            {
                text = "c";
            }
            if (num == 3)
            {
                text = "D";
            }
            if (num == 4)
            {
                text = "f";
            }
            if (num == 5)
            {
                text = "z";
            }
            if (num == 6)
            {
                text = "R";
            }
            if (num == 7)
            {
                text = "v";
            }
            if (num == 8)
            {
                text = "Q";
            }
            if (num == 9)
            {
                text = "L";
            }
            string volumeID = clsMe.GetVolumeID();
            string text2    = "";

            text2 = text2 + text + "QW";
            if (this.strflag == "init")
            {
                text2    += "0";
                this.Text = "数据升级-初次安装";
            }
            else
            {
                text2 += MDIParent.dsP.Tables["V"].Rows[0]["ver"].ToString();
            }
            this.txtHao.Text = clsMe.Encrypt(string.Concat(new string[]
            {
                num.ToString(),
                volumeID.Substring(0, 4),
                text,
                volumeID.Substring(4),
                text2
            }), "P&*GF12)");
        }
Exemplo n.º 40
0
 public DataTable GetFileData(string strFileName)
 {
     DataSet dataSet = new DataSet();
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     clsMe.GetFile(Directory.GetCurrentDirectory() + "\\" + strFileName + ".dat", Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip");
     clsCompression.UnZipFile(Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip", Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml");
     dataSet.ReadXml(Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml", XmlReadMode.ReadSchema);
     File.Delete(Directory.GetCurrentDirectory() + "\\" + strFileName + ".zip");
     File.Delete(Directory.GetCurrentDirectory() + "\\" + strFileName + ".xml");
     return dataSet.Tables[0];
 }
Exemplo n.º 41
0
 public frmNYList(string strLinkType, string strConditions)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     clsStr clsStr = new clsStr();
     DataView dataView = new DataView(MDIParent.dsP.Tables["P"]);
     switch (strLinkType)
     {
     case "QY_Used":
         dataView.RowFilter = string.Concat(new string[]
         {
             "F2='",
             strConditions,
             "' and R5>'",
             clsStr.Format(DateTime.Now.Date.ToString(), '-'),
             "'"
         });
         this.SetHeaders_QY();
         for (int i = 0; i < dataView.Count; i++)
         {
             DataRow dataRow = this.tblResult.NewRow();
             dataRow["R1"] = dataView[i]["R1"];
             dataRow["R2"] = dataView[i]["R2"];
             dataRow["HL"] = dataView[i]["HL"];
             dataRow["R12"] = dataView[i]["R12"];
             dataRow["R4"] = dataView[i]["R4"];
             dataRow["R5"] = dataView[i]["R5"];
             dataRow["F2"] = dataView[i]["F2"];
             dataRow["R13"] = dataView[i]["R13"];
             dataRow["R11"] = dataView[i]["R11"];
             dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
             dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
             dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
             this.tblResult.Rows.Add(dataRow);
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_QY();
         break;
     case "QY_Unused":
         dataView.RowFilter = string.Concat(new string[]
         {
             "F2='",
             strConditions,
             "' and R5<'",
             clsStr.Format(DateTime.Now.Date.ToString(), '-'),
             "'"
         });
         this.SetHeaders_QY();
         for (int i = 0; i < dataView.Count; i++)
         {
             DataRow dataRow = this.tblResult.NewRow();
             dataRow["R1"] = dataView[i]["R1"];
             dataRow["R2"] = dataView[i]["R2"];
             dataRow["HL"] = dataView[i]["HL"];
             dataRow["R12"] = dataView[i]["R12"];
             dataRow["R4"] = dataView[i]["R4"];
             dataRow["R5"] = dataView[i]["R5"];
             dataRow["F2"] = dataView[i]["F2"];
             dataRow["R13"] = dataView[i]["R13"];
             dataRow["R11"] = dataView[i]["R11"];
             dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
             dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
             dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
             this.tblResult.Rows.Add(dataRow);
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_QY();
         break;
     case "YXCF":
     {
         string[] array = clsStr.Seperate(strConditions, '|');
         dataView.RowFilter = string.Concat(new string[]
         {
             "E2 like '%",
             array[0],
             "%' and E3 like '%",
             array[1],
             "%'"
         });
         this.SetHeaders_YXCF();
         for (int i = 0; i < dataView.Count; i++)
         {
             string[] array2 = clsStr.Seperate(dataView[i]["E2"].ToString(), '、');
             string[] array3 = clsStr.Seperate(dataView[i]["E3"].ToString(), '、');
             for (int j = 0; j < array2.Length; j++)
             {
                 if (array2[j] == array[0] && array3[j] == array[1])
                 {
                     DataRow dataRow = this.tblResult.NewRow();
                     dataRow["R1"] = dataView[i]["R1"];
                     dataRow["R2"] = dataView[i]["R2"];
                     dataRow["HL"] = dataView[i]["HL"];
                     dataRow["R12"] = dataView[i]["R12"];
                     dataRow["R4"] = dataView[i]["R4"];
                     dataRow["R5"] = dataView[i]["R5"];
                     dataRow["F2"] = dataView[i]["F2"];
                     dataRow["R13"] = dataView[i]["R13"];
                     dataRow["R11"] = dataView[i]["R11"];
                     dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
                     dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
                     dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                     this.tblResult.Rows.Add(dataRow);
                     break;
                 }
             }
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_YXCF();
         break;
     }
     case "ZWFZDX":
     {
         string[] array = clsStr.Seperate(strConditions, '|');
         dataView.RowFilter = string.Concat(new string[]
         {
             "C2 like '%",
             array[0],
             "%' and T2 like '%",
             array[1],
             "%'"
         });
         this.SetHeaders_ZWFZDX();
         for (int i = 0; i < dataView.Count; i++)
         {
             bool flag = false;
             string[] array4 = clsStr.Seperate(dataView[i]["C2"].ToString(), '|');
             string[] array5 = clsStr.Seperate(dataView[i]["T2"].ToString(), '|');
             for (int j = 0; j < array4.Length; j++)
             {
                 if (array4[j] == array[0] && array5[j] == array[1])
                 {
                     flag = true;
                     DataRow dataRow = this.tblResult.NewRow();
                     dataRow["R1"] = dataView[i]["R1"];
                     dataRow["R2"] = dataView[i]["R2"];
                     dataRow["HL"] = dataView[i]["HL"];
                     dataRow["R12"] = dataView[i]["R12"];
                     dataRow["R80"] = dataView[i]["R80"];
                     dataRow["R90"] = dataView[i]["R90"];
                     dataRow["R4"] = dataView[i]["R4"];
                     dataRow["R5"] = dataView[i]["R5"];
                     dataRow["F2"] = dataView[i]["F2"];
                     dataRow["R13"] = dataView[i]["R13"];
                     dataRow["R11"] = dataView[i]["R11"];
                     dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
                     dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
                     dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                     this.tblResult.Rows.Add(dataRow);
                 }
                 if (flag)
                 {
                     break;
                 }
             }
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_ZWFXDX();
         break;
     }
     case "YXCF2JX":
     {
         string[] array = clsStr.Seperate(strConditions, '|');
         dataView.RowFilter = string.Concat(new string[]
         {
             "E2 like '%",
             array[0],
             "%' and E3 like '%",
             array[1],
             "%' ",
             (array[2] == "") ? "" : (" and R13='" + array[2] + "'"),
             " and ",
             array[3]
         });
         this.SetHeaders_JX();
         for (int i = 0; i < dataView.Count; i++)
         {
             DataRow dataRow = this.tblResult.NewRow();
             dataRow["R1"] = dataView[i]["R1"];
             dataRow["R2"] = dataView[i]["R2"];
             dataRow["HL"] = dataView[i]["HL"];
             dataRow["R12"] = dataView[i]["R12"];
             dataRow["R80"] = dataView[i]["R80"];
             dataRow["R90"] = dataView[i]["R90"];
             dataRow["R4"] = dataView[i]["R4"];
             dataRow["R5"] = dataView[i]["R5"];
             dataRow["F2"] = dataView[i]["F2"];
             dataRow["R13"] = dataView[i]["R13"];
             dataRow["R11"] = dataView[i]["R11"];
             dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
             dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
             dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
             this.tblResult.Rows.Add(dataRow);
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_JX();
         break;
     }
     case "YXCF2ZWFXDX":
     {
         string[] array = clsStr.Seperate(strConditions, '|');
         dataView.RowFilter = string.Concat(new string[]
         {
             "C2 like '%",
             array[0],
             "%' and T2 like '%",
             array[1],
             "%' and ",
             array[2]
         });
         this.SetHeaders_ZWFZDX();
         for (int i = 0; i < dataView.Count; i++)
         {
             bool flag = false;
             string[] array4 = clsStr.Seperate(dataView[i]["C2"].ToString(), '|');
             string[] array5 = clsStr.Seperate(dataView[i]["T2"].ToString(), '|');
             for (int j = 0; j < array4.Length; j++)
             {
                 if (array4[j] == array[0] && array5[j] == array[1])
                 {
                     flag = true;
                     DataRow dataRow = this.tblResult.NewRow();
                     dataRow["R1"] = dataView[i]["R1"];
                     dataRow["R2"] = dataView[i]["R2"];
                     dataRow["HL"] = dataView[i]["HL"];
                     dataRow["R12"] = dataView[i]["R12"];
                     dataRow["R80"] = dataView[i]["R80"];
                     dataRow["R90"] = dataView[i]["R90"];
                     dataRow["R4"] = dataView[i]["R4"];
                     dataRow["R5"] = dataView[i]["R5"];
                     dataRow["F2"] = dataView[i]["F2"];
                     dataRow["R13"] = dataView[i]["R13"];
                     dataRow["R11"] = dataView[i]["R11"];
                     dataRow["C2"] = dataView[i]["C2"].ToString().Replace("|", "、");
                     dataRow["T2"] = dataView[i]["T2"].ToString().Replace("|", "、");
                     dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                     this.tblResult.Rows.Add(dataRow);
                 }
                 if (flag)
                 {
                     break;
                 }
             }
         }
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_ZWFXDX();
         break;
     }
     case "QYCPTJ":
     {
         this.SetHeaders_QYCPTJ();
         DataRow[] array6 = MDIParent.dsP.Tables["P"].Select("", "F2");
         DataRow[] array7 = MDIParent.dsF.Tables["F"].Select("", "F2");
         DataTable dataTable = new DataTable();
         dataTable = this.tblResult.Clone();
         int second = DateTime.Now.Second;
         string text = second.ToString();
         int num;
         if (text.Length > 1)
         {
             num = (int)Convert.ToInt16(text.Substring(text.Length - 1));
         }
         else
         {
             num = (int)Convert.ToInt16(text);
         }
         int k = 0;
         for (int i = 0; i < array7.Length; i++)
         {
             while (k < array6.Length)
             {
                 if (!(array7[i]["F2"].ToString() == array6[k]["F2"].ToString()))
                 {
                     break;
                 }
                 DataRow dataRow = dataTable.NewRow();
                 dataRow["R1"] = array6[k]["R1"];
                 dataRow["R2"] = array6[k]["R2"];
                 dataRow["HL"] = array6[k]["HL"];
                 dataRow["R12"] = array6[k]["R12"];
                 dataRow["R80"] = array6[k]["R80"];
                 dataRow["R90"] = array6[k]["R90"];
                 dataRow["R4"] = array6[k]["R4"];
                 dataRow["R5"] = array6[k]["R5"];
                 dataRow["F2"] = array7[i]["F2"];
                 dataRow["F9"] = array7[i]["F9"];
                 dataRow["F14"] = array7[i]["F14"];
                 dataRow["R11"] = array6[k]["R11"];
                 dataRow["R13"] = array6[k]["R13"];
                 dataRow["F8"] = array7[i]["F8"];
                 int num2 = (int)Convert.ToInt16(dataRow["R1"].ToString().Trim().Substring(dataRow["R1"].ToString().Trim().Length - 1));
                 if (num2 < num)
                 {
                     dataRow["XH"] = num2 - num + 10;
                 }
                 else
                 {
                     dataRow["XH"] = num2 - num;
                 }
                 if (dataRow["JS"].ToString().Trim() != "")
                 {
                     dataTable.Rows.Add(dataRow);
                 }
                 k++;
             }
             if (k == array6.Length)
             {
                 break;
             }
         }
         this.tblResult = dataTable.Copy();
         this.tblResult.DefaultView.Sort = "R5 desc";
         this.grv.DataSource = this.tblResult.DefaultView;
         this.SetStyle_QYCPTJ();
         break;
     }
     }
 }
Exemplo n.º 42
0
 private void frmHao_Load(object sender, EventArgs e)
 {
     clsMe clsMe = new clsMe();
     Random random = new Random(DateTime.Now.Millisecond);
     int num = random.Next(10);
     string text = "";
     if (num == 0)
     {
         text = "A";
     }
     if (num == 1)
     {
         text = "B";
     }
     if (num == 2)
     {
         text = "c";
     }
     if (num == 3)
     {
         text = "D";
     }
     if (num == 4)
     {
         text = "f";
     }
     if (num == 5)
     {
         text = "z";
     }
     if (num == 6)
     {
         text = "R";
     }
     if (num == 7)
     {
         text = "v";
     }
     if (num == 8)
     {
         text = "Q";
     }
     if (num == 9)
     {
         text = "L";
     }
     string volumeID = clsMe.GetVolumeID();
     string text2 = "";
     text2 = text2 + text + "QW";
     if (this.strflag == "init")
     {
         text2 += "0";
         this.Text = "数据升级-初次安装";
     }
     else
     {
         text2 += MDIParent.dsP.Tables["V"].Rows[0]["ver"].ToString();
     }
     this.txtHao.Text = clsMe.Encrypt(string.Concat(new string[]
     {
         num.ToString(),
         volumeID.Substring(0, 4),
         text,
         volumeID.Substring(4),
         text2
     }), "P&*GF12)");
 }
Exemplo n.º 43
0
        public frmNYList(string strLinkType, string strConditions)
        {
            this.InitializeComponent();
            clsMe clsMe = new clsMe();

            clsMe.setFormStyl(this);
            clsStr   clsStr   = new clsStr();
            DataView dataView = new DataView(MDIParent.dsP.Tables["P"]);

            switch (strLinkType)
            {
            case "QY_Used":
                dataView.RowFilter = string.Concat(new string[]
                {
                    "F2='",
                    strConditions,
                    "' and R5>'",
                    clsStr.Format(DateTime.Now.Date.ToString(), '-'),
                    "'"
                });
                this.SetHeaders_QY();
                for (int i = 0; i < dataView.Count; i++)
                {
                    DataRow dataRow = this.tblResult.NewRow();
                    dataRow["R1"]  = dataView[i]["R1"];
                    dataRow["R2"]  = dataView[i]["R2"];
                    dataRow["HL"]  = dataView[i]["HL"];
                    dataRow["R12"] = dataView[i]["R12"];
                    dataRow["R4"]  = dataView[i]["R4"];
                    dataRow["R5"]  = dataView[i]["R5"];
                    dataRow["F2"]  = dataView[i]["F2"];
                    dataRow["R13"] = dataView[i]["R13"];
                    dataRow["R11"] = dataView[i]["R11"];
                    dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                    dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                    dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                    this.tblResult.Rows.Add(dataRow);
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_QY();
                break;

            case "QY_Unused":
                dataView.RowFilter = string.Concat(new string[]
                {
                    "F2='",
                    strConditions,
                    "' and R5<'",
                    clsStr.Format(DateTime.Now.Date.ToString(), '-'),
                    "'"
                });
                this.SetHeaders_QY();
                for (int i = 0; i < dataView.Count; i++)
                {
                    DataRow dataRow = this.tblResult.NewRow();
                    dataRow["R1"]  = dataView[i]["R1"];
                    dataRow["R2"]  = dataView[i]["R2"];
                    dataRow["HL"]  = dataView[i]["HL"];
                    dataRow["R12"] = dataView[i]["R12"];
                    dataRow["R4"]  = dataView[i]["R4"];
                    dataRow["R5"]  = dataView[i]["R5"];
                    dataRow["F2"]  = dataView[i]["F2"];
                    dataRow["R13"] = dataView[i]["R13"];
                    dataRow["R11"] = dataView[i]["R11"];
                    dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                    dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                    dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                    this.tblResult.Rows.Add(dataRow);
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_QY();
                break;

            case "YXCF":
            {
                string[] array = clsStr.Seperate(strConditions, '|');
                dataView.RowFilter = string.Concat(new string[]
                    {
                        "E2 like '%",
                        array[0],
                        "%' and E3 like '%",
                        array[1],
                        "%'"
                    });
                this.SetHeaders_YXCF();
                for (int i = 0; i < dataView.Count; i++)
                {
                    string[] array2 = clsStr.Seperate(dataView[i]["E2"].ToString(), '、');
                    string[] array3 = clsStr.Seperate(dataView[i]["E3"].ToString(), '、');
                    for (int j = 0; j < array2.Length; j++)
                    {
                        if (array2[j] == array[0] && array3[j] == array[1])
                        {
                            DataRow dataRow = this.tblResult.NewRow();
                            dataRow["R1"]  = dataView[i]["R1"];
                            dataRow["R2"]  = dataView[i]["R2"];
                            dataRow["HL"]  = dataView[i]["HL"];
                            dataRow["R12"] = dataView[i]["R12"];
                            dataRow["R4"]  = dataView[i]["R4"];
                            dataRow["R5"]  = dataView[i]["R5"];
                            dataRow["F2"]  = dataView[i]["F2"];
                            dataRow["R13"] = dataView[i]["R13"];
                            dataRow["R11"] = dataView[i]["R11"];
                            dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                            dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                            dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                            this.tblResult.Rows.Add(dataRow);
                            break;
                        }
                    }
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_YXCF();
                break;
            }

            case "ZWFZDX":
            {
                string[] array = clsStr.Seperate(strConditions, '|');
                dataView.RowFilter = string.Concat(new string[]
                    {
                        "C2 like '%",
                        array[0],
                        "%' and T2 like '%",
                        array[1],
                        "%'"
                    });
                this.SetHeaders_ZWFZDX();
                for (int i = 0; i < dataView.Count; i++)
                {
                    bool     flag   = false;
                    string[] array4 = clsStr.Seperate(dataView[i]["C2"].ToString(), '|');
                    string[] array5 = clsStr.Seperate(dataView[i]["T2"].ToString(), '|');
                    for (int j = 0; j < array4.Length; j++)
                    {
                        if (array4[j] == array[0] && array5[j] == array[1])
                        {
                            flag = true;
                            DataRow dataRow = this.tblResult.NewRow();
                            dataRow["R1"]  = dataView[i]["R1"];
                            dataRow["R2"]  = dataView[i]["R2"];
                            dataRow["HL"]  = dataView[i]["HL"];
                            dataRow["R12"] = dataView[i]["R12"];
                            dataRow["R80"] = dataView[i]["R80"];
                            dataRow["R90"] = dataView[i]["R90"];
                            dataRow["R4"]  = dataView[i]["R4"];
                            dataRow["R5"]  = dataView[i]["R5"];
                            dataRow["F2"]  = dataView[i]["F2"];
                            dataRow["R13"] = dataView[i]["R13"];
                            dataRow["R11"] = dataView[i]["R11"];
                            dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                            dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                            dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                            this.tblResult.Rows.Add(dataRow);
                        }
                        if (flag)
                        {
                            break;
                        }
                    }
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_ZWFXDX();
                break;
            }

            case "YXCF2JX":
            {
                string[] array = clsStr.Seperate(strConditions, '|');
                dataView.RowFilter = string.Concat(new string[]
                    {
                        "E2 like '%",
                        array[0],
                        "%' and E3 like '%",
                        array[1],
                        "%' ",
                        (array[2] == "") ? "" : (" and R13='" + array[2] + "'"),
                        " and ",
                        array[3]
                    });
                this.SetHeaders_JX();
                for (int i = 0; i < dataView.Count; i++)
                {
                    DataRow dataRow = this.tblResult.NewRow();
                    dataRow["R1"]  = dataView[i]["R1"];
                    dataRow["R2"]  = dataView[i]["R2"];
                    dataRow["HL"]  = dataView[i]["HL"];
                    dataRow["R12"] = dataView[i]["R12"];
                    dataRow["R80"] = dataView[i]["R80"];
                    dataRow["R90"] = dataView[i]["R90"];
                    dataRow["R4"]  = dataView[i]["R4"];
                    dataRow["R5"]  = dataView[i]["R5"];
                    dataRow["F2"]  = dataView[i]["F2"];
                    dataRow["R13"] = dataView[i]["R13"];
                    dataRow["R11"] = dataView[i]["R11"];
                    dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                    dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                    dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                    this.tblResult.Rows.Add(dataRow);
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_JX();
                break;
            }

            case "YXCF2ZWFXDX":
            {
                string[] array = clsStr.Seperate(strConditions, '|');
                dataView.RowFilter = string.Concat(new string[]
                    {
                        "C2 like '%",
                        array[0],
                        "%' and T2 like '%",
                        array[1],
                        "%' and ",
                        array[2]
                    });
                this.SetHeaders_ZWFZDX();
                for (int i = 0; i < dataView.Count; i++)
                {
                    bool     flag   = false;
                    string[] array4 = clsStr.Seperate(dataView[i]["C2"].ToString(), '|');
                    string[] array5 = clsStr.Seperate(dataView[i]["T2"].ToString(), '|');
                    for (int j = 0; j < array4.Length; j++)
                    {
                        if (array4[j] == array[0] && array5[j] == array[1])
                        {
                            flag = true;
                            DataRow dataRow = this.tblResult.NewRow();
                            dataRow["R1"]  = dataView[i]["R1"];
                            dataRow["R2"]  = dataView[i]["R2"];
                            dataRow["HL"]  = dataView[i]["HL"];
                            dataRow["R12"] = dataView[i]["R12"];
                            dataRow["R80"] = dataView[i]["R80"];
                            dataRow["R90"] = dataView[i]["R90"];
                            dataRow["R4"]  = dataView[i]["R4"];
                            dataRow["R5"]  = dataView[i]["R5"];
                            dataRow["F2"]  = dataView[i]["F2"];
                            dataRow["R13"] = dataView[i]["R13"];
                            dataRow["R11"] = dataView[i]["R11"];
                            dataRow["C2"]  = dataView[i]["C2"].ToString().Replace("|", "、");
                            dataRow["T2"]  = dataView[i]["T2"].ToString().Replace("|", "、");
                            dataRow["R10"] = dataView[i]["R10"].ToString().Replace("|", "、");
                            this.tblResult.Rows.Add(dataRow);
                        }
                        if (flag)
                        {
                            break;
                        }
                    }
                }
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_ZWFXDX();
                break;
            }

            case "QYCPTJ":
            {
                this.SetHeaders_QYCPTJ();
                DataRow[] array6    = MDIParent.dsP.Tables["P"].Select("", "F2");
                DataRow[] array7    = MDIParent.dsF.Tables["F"].Select("", "F2");
                DataTable dataTable = new DataTable();
                dataTable = this.tblResult.Clone();
                int    second = DateTime.Now.Second;
                string text   = second.ToString();
                int    num;
                if (text.Length > 1)
                {
                    num = (int)Convert.ToInt16(text.Substring(text.Length - 1));
                }
                else
                {
                    num = (int)Convert.ToInt16(text);
                }
                int k = 0;
                for (int i = 0; i < array7.Length; i++)
                {
                    while (k < array6.Length)
                    {
                        if (!(array7[i]["F2"].ToString() == array6[k]["F2"].ToString()))
                        {
                            break;
                        }
                        DataRow dataRow = dataTable.NewRow();
                        dataRow["R1"]  = array6[k]["R1"];
                        dataRow["R2"]  = array6[k]["R2"];
                        dataRow["HL"]  = array6[k]["HL"];
                        dataRow["R12"] = array6[k]["R12"];
                        dataRow["R80"] = array6[k]["R80"];
                        dataRow["R90"] = array6[k]["R90"];
                        dataRow["R4"]  = array6[k]["R4"];
                        dataRow["R5"]  = array6[k]["R5"];
                        dataRow["F2"]  = array7[i]["F2"];
                        dataRow["F9"]  = array7[i]["F9"];
                        dataRow["F14"] = array7[i]["F14"];
                        dataRow["R11"] = array6[k]["R11"];
                        dataRow["R13"] = array6[k]["R13"];
                        dataRow["F8"]  = array7[i]["F8"];
                        int num2 = (int)Convert.ToInt16(dataRow["R1"].ToString().Trim().Substring(dataRow["R1"].ToString().Trim().Length - 1));
                        if (num2 < num)
                        {
                            dataRow["XH"] = num2 - num + 10;
                        }
                        else
                        {
                            dataRow["XH"] = num2 - num;
                        }
                        if (dataRow["JS"].ToString().Trim() != "")
                        {
                            dataTable.Rows.Add(dataRow);
                        }
                        k++;
                    }
                    if (k == array6.Length)
                    {
                        break;
                    }
                }
                this.tblResult = dataTable.Copy();
                this.tblResult.DefaultView.Sort = "R5 desc";
                this.grv.DataSource             = this.tblResult.DefaultView;
                this.SetStyle_QYCPTJ();
                break;
            }
            }
        }
Exemplo n.º 44
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     clsStr clsStr = new clsStr();
     clsMe clsMe = new clsMe();
     this.Cursor = Cursors.WaitCursor;
     string text = "";
     string[] array = clsStr.Seperate(this.txtDJZH.Text, ' ');
     string text2 = "";
     for (int i = 0; i < array.Length; i++)
     {
         if (!(array[i] == ""))
         {
             if (text2 == "")
             {
                 text2 = "R1 like '%" + array[i] + "%'";
             }
             else
             {
                 text2 = text2 + " or R1 like '%" + array[i] + "%'";
             }
         }
     }
     if (text2 != "")
     {
         if (text == "")
         {
             text = "(" + text2 + ")";
         }
         else
         {
             text = text + " and (" + text2 + ")";
         }
     }
     array = clsStr.Seperate(this.txtDJMC.Text, ' ');
     text2 = "";
     for (int i = 0; i < array.Length; i++)
     {
         if (!(array[i] == ""))
         {
             array[i] = array[i].Replace("%", "[%]");
             if (text2 == "")
             {
                 text2 = "R2 like '%" + array[i] + "%'";
             }
             else
             {
                 text2 = text2 + " or R2 like '%" + array[i] + "%'";
             }
         }
     }
     if (text2 != "")
     {
         if (text == "")
         {
             text = "(" + text2 + ")";
         }
         else
         {
             text = text + " and (" + text2 + ")";
         }
     }
     if (text2 != "")
     {
         if (text == "")
         {
             text = "(" + text2 + ")";
         }
         else
         {
             text = text + " and (" + text2 + ")";
         }
     }
     if (this.cboNYLB.Text.Trim() != "")
     {
         if (text == "")
         {
             text = "R12 = '" + this.cboNYLB.Text.Trim() + "'";
         }
         else
         {
             text = text + " and R12 = '" + this.cboNYLB.Text.Trim() + "'";
         }
     }
     if (this.txtJX.Text.Trim() != "")
     {
         if (text == "")
         {
             text = "R13 like '%" + this.txtJX.Text.Trim() + "%'";
         }
         else
         {
             text = text + " and R13 like '%" + this.txtJX.Text.Trim() + "%'";
         }
     }
     DataRow[] array2 = MDIParent.dsP.Tables["P"].Select(text, "F2");
     DataRow[] array3 = MDIParent.dsF.Tables["F"].Select("", "F2");
     DataTable dataTable = new DataTable();
     dataTable = this.tblResult.Clone();
     int j = 0;
     string text3 = DateTime.Now.Second.ToString();
     if (text3.Length > 1)
     {
         int num = (int)Convert.ToInt16(text3.Substring(text3.Length - 1));
     }
     else
     {
         int num = (int)Convert.ToInt16(text3);
     }
     string b = "***";
     for (int i = 0; i < array3.Length; i++)
     {
         while (j < array2.Length)
         {
             if (!(array3[i]["F2"].ToString() == array2[j]["F2"].ToString()))
             {
                 break;
             }
             if (array3[i]["F2"].ToString() != b)
             {
                 DataRow dataRow = dataTable.NewRow();
                 dataRow["F2"] = array3[i]["F2"];
                 dataRow["F3"] = array3[i]["F3"];
                 dataRow["F4"] = array3[i]["F4"];
                 dataRow["F5"] = array3[i]["F5"];
                 dataRow["F6"] = array3[i]["F6"];
                 dataRow["F7"] = array3[i]["F7"];
                 dataRow["F8"] = array3[i]["F8"];
                 dataRow["F9"] = array3[i]["F9"];
                 dataRow["F10"] = array3[i]["F10"];
                 dataRow["F11"] = array3[i]["F11"];
                 dataRow["F12"] = array3[i]["F12"];
                 dataRow["F14"] = array3[i]["F14"];
                 dataTable.Rows.Add(dataRow);
                 b = array3[i]["F2"].ToString();
             }
             j++;
         }
         if (j == array2.Length)
         {
             break;
         }
     }
     this.tblResult = dataTable.Copy();
     DataView dataSource = new DataView(this.tblResult);
     this.gridControl1.DataSource = dataSource;
     this.Cursor = Cursors.Default;
     if (this.tblResult.Rows.Count == 0)
     {
         MessageBox.Show(this, "查询不到相关数据,可能由以下原因造成:\r\n1、您输入的条件太多,过于复杂;\r\n2、该厂家或已更改名称;\r\n3、不存在该厂家;\r\n请您重新输入简单正确条件后继续查询!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         this.txtDJZH.Focus();
     }
 }
Exemplo n.º 45
0
 private void initAED()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\ActiveElementDetail.dat";
     string text = Directory.GetCurrentDirectory() + "\\JGS\\ActiveElementDetail.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\JGS\\ActiveElementDetail.xml";
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     MDIParent.dsAED.ReadXmlSchema(text2);
     MDIParent.dsAED.ReadXml(text2, XmlReadMode.IgnoreSchema);
     clsMe.PlanData(MDIParent.dsAED, "aed", "E2|E3|");
     File.Delete(text);
     File.Delete(text2);
     this.SetPicWidth(100);
     this.SetProgressBar1(5);
 }
Exemplo n.º 46
0
 public frmNYDetail(string strR1, string strF8, string strF14)
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.strF8 = strF8;
     this.strF14 = strF14;
     clsStr clsStr = new clsStr();
     DataRow[] array = MDIParent.dsP.Tables["P"].Select("R1='" + strR1 + "'");
     this.txtDJZH.Text = array[0]["R1"].ToString();
     this.txtYXQSRQ.Text = array[0]["R4"].ToString();
     this.txtYXJZRQ.Text = array[0]["R5"].ToString();
     this.txtDJMC.Text = array[0]["R2"].ToString();
     this.txtDX.Text = array[0]["R11"].ToString();
     this.txtJX.Text = array[0]["R13"].ToString();
     this.txtDWMC.Text = array[0]["F2"].ToString();
     this.txtNYLB.Text = array[0]["R12"].ToString();
     this.txtXKZH.Text = array[0]["R80"].ToString();
     this.txtQYBZ.Text = array[0]["R90"].ToString();
     DataTable dataTable = new DataTable();
     dataTable.TableName = "Result1";
     dataTable.Columns.Add("E2");
     dataTable.Columns.Add("E3");
     dataTable.Columns.Add("R7");
     string[] array2 = clsStr.Seperate(array[0]["E2"].ToString(), '、');
     string[] array3 = clsStr.Seperate(array[0]["E3"].ToString(), '、');
     string[] array4 = clsStr.Seperate(array[0]["R7"].ToString(), '、');
     for (int i = 0; i < array2.Length; i++)
     {
         DataRow dataRow = dataTable.NewRow();
         dataRow["E2"] = array2[i];
         dataRow["E3"] = array3[i];
         dataRow["R7"] = array4[i];
         dataTable.Rows.Add(dataRow);
     }
     this.grvYXCF.DataSource = dataTable;
     DataTable dataTable2 = new DataTable();
     dataTable2.TableName = "Result2";
     dataTable2.Columns.Add("C2");
     dataTable2.Columns.Add("T2");
     dataTable2.Columns.Add("R10");
     dataTable2.Columns.Add("R14");
     string[] array5 = clsStr.Seperate(array[0]["C2"].ToString(), '|');
     string[] array6 = clsStr.Seperate(array[0]["T2"].ToString(), '|');
     string[] array7 = clsStr.Seperate(array[0]["R10"].ToString(), '|');
     string[] array8 = clsStr.Seperate(array[0]["R14"].ToString(), '|');
     for (int i = 0; i < array5.Length; i++)
     {
         if (!(array5[i].ToString() == "") || !(array6[i].ToString() == ""))
         {
             DataRow dataRow = dataTable2.NewRow();
             dataRow["C2"] = array5[i];
             dataRow["T2"] = array6[i];
             dataRow["R10"] = array7[i];
             dataRow["R14"] = array8[i];
             dataTable2.Rows.Add(dataRow);
         }
     }
     this.grvZWFZDX.DataSource = dataTable2;
     this.pages = ((DataTable)this.grvZWFZDX.DataSource).Rows.Count / (this.pagesize + 1);
     if (this.pages * (this.pagesize + 1) != ((DataTable)this.grvZWFZDX.DataSource).Rows.Count)
     {
         this.pages++;
     }
 }
Exemplo n.º 47
0
 private void initF()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\Firm.dat";
     string text = Directory.GetCurrentDirectory() + "\\JGS\\Firm.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\JGS\\Firm.xml";
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     MDIParent.dsF.ReadXmlSchema(text2);
     MDIParent.dsF.ReadXml(text2, XmlReadMode.IgnoreSchema);
     clsMe.PlanData(MDIParent.dsF, "f", "F2|F9|F10|F14|");
     File.Delete(text);
     File.Delete(text2);
     this.SetPicWidth(100);
     this.SetProgressBar1(10);
 }
Exemplo n.º 48
0
 private void initT15()
 {
     clsMe clsMe = new clsMe();
     clsCompression clsCompression = new clsCompression();
     string strFromFile = Directory.GetCurrentDirectory() + "\\t15.dat";
     string text = Directory.GetCurrentDirectory() + "\\t15.zip";
     string text2 = Directory.GetCurrentDirectory() + "\\t15.xml";
     DataSet dataSet = new DataSet();
     clsMe.GetFile(strFromFile, text);
     clsCompression.UnZipFile(text, text2);
     this.dsT15.ReadXmlSchema(text2);
     this.dsT15.ReadXml(text2, XmlReadMode.IgnoreSchema);
     clsMe.PlanData(this.dsT15, "T15", "CPMC|FMISPCNAME|");
     File.Delete(text);
     File.Delete(text2);
 }
Exemplo n.º 49
0
 private void MDIParent_Load(object sender, EventArgs e)
 {
     if (this.picEnter.Enabled)
     {
         this.lblDays.Text = "";
         DataSet dataSet = new DataSet();
         dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema);
         string text = dataSet.Tables["t1"].Rows[0]["c3"].ToString();
         string text2 = dataSet.Tables["t1"].Rows[0]["c2"].ToString();
         clsMe clsMe = new clsMe();
         text = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default);
         text2 = clsMe.Decrypt(text2, "ja7z%$Or29W]", Encoding.Default);
         text2 = text2.Substring(text2.IndexOf("%") + 1);
         this.lblPrompt.Text = text + "                    " + MDIParent.dsP.Tables["v"].Rows[0]["fxrq"].ToString();
         if (text2.CompareTo(MDIParent.dsP.Tables["v"].Rows[0]["ver"].ToString()) != 0)
         {
             MessageBox.Show(this, "数据文件和配置文件参数设置不一样,暂时无法提供查询服务!\r\n咨询电话:010-51268119!", "提示!", MessageBoxButtons.OK);
             File.Delete(Directory.GetCurrentDirectory() + "\\p3.xml");
             this.picEnter.Enabled = false;
             this.lblDays.Visible = false;
         }
         else
         {
             if (MDIParent.dsP.Tables["v"].Rows[0]["fxrq"].ToString().CompareTo(text) > 0)
             {
                 MessageBox.Show(this, "您已过数据服务期限,暂时无法提供查询服务!\r\n咨询电话:010-51268119!", "提示!", MessageBoxButtons.OK);
                 this.picEnter.Enabled = false;
                 this.lblDays.Visible = false;
                 this.lblPrompt.Visible = false;
                 frmHao frmHao = new frmHao("");
                 MDIParent.SetParent(frmHao.Handle, MDIParent.MDIForm.Handle);
                 frmHao.Show();
             }
             else
             {
                 DateTime d = Convert.ToDateTime(text);
                 DateTime today = DateTime.Today;
                 int days = (d - today).Days;
                 if (days <= 30)
                 {
                     this.pictureBox2.Visible = true;
                     this.lblDays.Text = "急!最后" + days.ToString() + "天了!赶紧续费!";
                 }
                 else
                 {
                     if (days <= 60)
                     {
                         this.pictureBox2.Visible = true;
                         this.lblDays.Text = "剩下" + days.ToString() + "天的时间了!该续费了!";
                     }
                     else
                     {
                         if (days <= 90)
                         {
                             this.pictureBox2.Visible = true;
                             this.lblDays.Text = "还可以使用" + days.ToString() + "天!抓紧续费吧!";
                         }
                     }
                 }
             }
         }
         Rectangle rectangle = default(Rectangle);
         rectangle = Screen.GetWorkingArea(this);
         MDIParent.screen_width = rectangle.Width;
         MDIParent.screen_height = rectangle.Height;
     }
     else
     {
         this.lblPrompt.Visible = false;
         this.lblDays.Visible = false;
     }
 }
Exemplo n.º 50
0
 public frmNY()
 {
     this.InitializeComponent();
     clsMe clsMe = new clsMe();
     clsMe.setFormStyl(this);
     this.SetGridControl();
 }
Exemplo n.º 51
0
 private void pictureBox_filter_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmFilter frmFilter = new frmFilter(this.gridView1.Columns);
         frmFilter.ShowDialog();
         clsMe clsMe = new clsMe();
         if (frmFilter.FilterColumn.Length > 0)
         {
             clsMe.FilterView(this.gridControl1, frmFilter.FilterColumn);
         }
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再过滤!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 52
0
 private void MDIParent_Load(object sender, EventArgs e)
 {
     if (this.picEnter.Enabled)
     {
         this.lblDays.Text = "";
         DataSet dataSet = new DataSet();
         dataSet.ReadXml(Application.StartupPath + "\\p3.xml", XmlReadMode.ReadSchema);
         string text  = dataSet.Tables["t1"].Rows[0]["c3"].ToString();
         string text2 = dataSet.Tables["t1"].Rows[0]["c2"].ToString();
         clsMe  clsMe = new clsMe();
         text  = clsMe.Decrypt(text, "ja7z%$Or29W]", Encoding.Default);
         text2 = clsMe.Decrypt(text2, "ja7z%$Or29W]", Encoding.Default);
         text2 = text2.Substring(text2.IndexOf("%") + 1);
         this.lblPrompt.Text = text + "                    " + MDIParent.dsP.Tables["v"].Rows[0]["fxrq"].ToString();
         if (text2.CompareTo(MDIParent.dsP.Tables["v"].Rows[0]["ver"].ToString()) != 0)
         {
             MessageBox.Show(this, "数据文件和配置文件参数设置不一样,暂时无法提供查询服务!\r\n咨询电话:010-51268119!", "提示!", MessageBoxButtons.OK);
             File.Delete(Directory.GetCurrentDirectory() + "\\p3.xml");
             this.picEnter.Enabled = false;
             this.lblDays.Visible  = false;
         }
         else
         {
             if (MDIParent.dsP.Tables["v"].Rows[0]["fxrq"].ToString().CompareTo(text) > 0)
             {
                 MessageBox.Show(this, "您已过数据服务期限,暂时无法提供查询服务!\r\n咨询电话:010-51268119!", "提示!", MessageBoxButtons.OK);
                 this.picEnter.Enabled  = false;
                 this.lblDays.Visible   = false;
                 this.lblPrompt.Visible = false;
                 frmHao frmHao = new frmHao("");
                 MDIParent.SetParent(frmHao.Handle, MDIParent.MDIForm.Handle);
                 frmHao.Show();
             }
             else
             {
                 DateTime d     = Convert.ToDateTime(text);
                 DateTime today = DateTime.Today;
                 int      days  = (d - today).Days;
                 if (days <= 30)
                 {
                     this.pictureBox2.Visible = true;
                     this.lblDays.Text        = "急!最后" + days.ToString() + "天了!赶紧续费!";
                 }
                 else
                 {
                     if (days <= 60)
                     {
                         this.pictureBox2.Visible = true;
                         this.lblDays.Text        = "剩下" + days.ToString() + "天的时间了!该续费了!";
                     }
                     else
                     {
                         if (days <= 90)
                         {
                             this.pictureBox2.Visible = true;
                             this.lblDays.Text        = "还可以使用" + days.ToString() + "天!抓紧续费吧!";
                         }
                     }
                 }
             }
         }
         Rectangle rectangle = default(Rectangle);
         rectangle = Screen.GetWorkingArea(this);
         MDIParent.screen_width  = rectangle.Width;
         MDIParent.screen_height = rectangle.Height;
     }
     else
     {
         this.lblPrompt.Visible = false;
         this.lblDays.Visible   = false;
     }
 }
Exemplo n.º 53
0
 private void pictureBox_view_Click(object sender, EventArgs e)
 {
     if (this.gridView1.RowCount > 0)
     {
         frmView frmView = new frmView(this.gridView1.Columns);
         frmView.ShowDialog();
         clsMe clsMe = new clsMe();
         clsMe.ViewGrid(this.gridView1, frmView.listbox);
     }
     else
     {
         MessageBox.Show(this, "请您先查询数据后再视图显示!", "提示", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 54
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     clsStr clsStr = new clsStr();
     clsMe clsMe = new clsMe();
     if (!this.radAll.Checked && this.cboDJSQ.Text.Trim() == "")
     {
         MessageBox.Show(this, "查找范围不是全部时,登记日期不能空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         this.cboDJSQ.Focus();
     }
     else
     {
         this.Cursor = Cursors.WaitCursor;
         string text = "";
         string[] array = clsStr.Seperate(this.txtDJZH.Text, ' ');
         string text2 = "";
         for (int i = 0; i < array.Length; i++)
         {
             if (!(array[i] == ""))
             {
                 if (text2 == "")
                 {
                     text2 = "R1 like '%" + array[i] + "%'";
                 }
                 else
                 {
                     text2 = text2 + " or R1 like '%" + array[i] + "%'";
                 }
             }
         }
         if (text2 != "")
         {
             if (text == "")
             {
                 text = "(" + text2 + ")";
             }
             else
             {
                 text = text + " and (" + text2 + ")";
             }
         }
         array = clsStr.Seperate(this.txtDJMC.Text, ' ');
         text2 = "";
         for (int i = 0; i < array.Length; i++)
         {
             if (!(array[i] == ""))
             {
                 array[i] = array[i].Replace("%", "[%]");
                 if (text2 == "")
                 {
                     text2 = "R2 like '%" + array[i] + "%'";
                 }
                 else
                 {
                     text2 = text2 + " or R2 like '%" + array[i] + "%'";
                 }
             }
         }
         if (text2 != "")
         {
             if (text == "")
             {
                 text = "(" + text2 + ")";
             }
             else
             {
                 text = text + " and (" + text2 + ")";
             }
         }
         text2 = "";
         Calendar calendar = CultureInfo.InvariantCulture.Calendar;
         string text3 = this.cboDJSQ.Text.Trim();
         if (text3 != null)
         {
             if (!(text3 == "本周"))
             {
                 if (!(text3 == "上一周"))
                 {
                     if (!(text3 == "本月"))
                     {
                         if (!(text3 == "上一月"))
                         {
                             if (!(text3 == "本年"))
                             {
                                 if (text3 == "上一年")
                                 {
                                     text2 = "R4>='" + clsStr.Format((Convert.ToInt32(calendar.GetYear(DateTime.Now.Date)) - 1).ToString() + "-01-01", '-') + "'";
                                     text2 = text2 + " and R4<'" + clsStr.Format(Convert.ToInt32(calendar.GetYear(DateTime.Now.Date)).ToString() + "-01-01", '-') + "'";
                                 }
                             }
                             else
                             {
                                 text2 = "R4>='" + clsStr.Format(Convert.ToInt32(calendar.GetYear(DateTime.Now.Date)).ToString() + "-01-01", '-') + "'";
                                 text2 = text2 + " and R4<='" + clsStr.Format(DateTime.Now.Date.ToString(), '-') + "'";
                             }
                         }
                         else
                         {
                             text2 = "R4>='" + clsStr.Format(DateTime.Now.Date.AddMonths(-1).ToString("yyyy-MM-dd").Substring(0, 8) + "01", '-') + "'";
                             text2 = text2 + " and R4<'" + clsStr.Format(DateTime.Now.Date.ToString("yyyy-MM-dd").Substring(0, 8) + "01", '-') + "'";
                         }
                     }
                     else
                     {
                         text2 = "R4>='" + clsStr.Format(DateTime.Now.Date.ToString("yyyy-MM-dd").Substring(0, 8) + "01", '-') + "'";
                         text2 = text2 + " and R4<='" + clsStr.Format(DateTime.Now.Date.ToString(), '-') + "'";
                     }
                 }
                 else
                 {
                     text2 = "R4 >'" + clsStr.Format(DateTime.Now.Date.AddDays((double)(-(double)this.ConvertNumWeek(calendar.GetDayOfWeek(DateTime.Now.Date).ToString()) - 7)).ToString(), '-') + "'";
                     text2 = text2 + " and R4 <'" + clsStr.Format(DateTime.Now.Date.AddDays((double)(-(double)this.ConvertNumWeek(calendar.GetDayOfWeek(DateTime.Now.Date).ToString()) + 1)).ToString(), '-') + "'";
                 }
             }
             else
             {
                 text2 = "R4 >'" + clsStr.Format(DateTime.Now.Date.AddDays((double)(-(double)this.ConvertNumWeek(calendar.GetDayOfWeek(DateTime.Now.Date).ToString()))).ToString(), '-') + "'";
                 text2 = text2 + " and R4<='" + clsStr.Format(DateTime.Now.Date.ToString(), '-') + "'";
             }
         }
         if (text2 != "")
         {
             if (text == "")
             {
                 text = "(" + text2 + ")";
             }
             else
             {
                 text = text + " and (" + text2 + ")";
             }
         }
         if (this.cboNYLB.Text.Trim() != "")
         {
             if (text == "")
             {
                 text = "R12 = '" + this.cboNYLB.Text.Trim() + "'";
             }
             else
             {
                 text = text + " and R12 = '" + this.cboNYLB.Text.Trim() + "'";
             }
         }
         if (this.txtJX.Text.Trim() != "")
         {
             if (text == "")
             {
                 text = "R13 like '%" + this.txtJX.Text.Trim() + "%'";
             }
             else
             {
                 text = text + " and R13 like '%" + this.txtJX.Text.Trim() + "%'";
             }
         }
         DataRow[] array2 = MDIParent.dsP.Tables["P"].Select(text, "F2");
         DataRow[] array3 = MDIParent.dsF.Tables["F"].Select("", "F2");
         DataTable dataTable = new DataTable();
         dataTable = this.tblResult.Clone();
         int j = 0;
         for (int i = 0; i < array3.Length; i++)
         {
             while (j < array2.Length)
             {
                 if (!(array3[i]["F2"].ToString() == array2[j]["F2"].ToString()))
                 {
                     break;
                 }
                 if (this.radAll.Checked)
                 {
                     DataRow dataRow = dataTable.NewRow();
                     dataRow["R1"] = array2[j]["R1"];
                     dataRow["R2"] = array2[j]["R2"];
                     dataRow["HL"] = array2[j]["HL"];
                     dataRow["R12"] = array2[j]["R12"];
                     dataRow["R80"] = array2[j]["R80"];
                     dataRow["R90"] = array2[j]["R90"];
                     dataRow["R4"] = array2[j]["R4"];
                     dataRow["R5"] = array2[j]["R5"];
                     dataRow["F2"] = array3[i]["F2"];
                     dataRow["F9"] = array3[i]["F9"];
                     dataRow["F14"] = array3[i]["F14"];
                     dataRow["R11"] = array2[j]["R11"];
                     dataRow["R13"] = array2[j]["R13"];
                     dataRow["F8"] = array3[i]["F8"];
                     dataTable.Rows.Add(dataRow);
                 }
                 else
                 {
                     if (this.radNewDJ.Checked)
                     {
                         if (array2[j]["R4"].ToString().Trim().Length > 3)
                         {
                             if (array2[j]["R1"].ToString().Substring(2, 4) == array2[j]["R4"].ToString().Substring(0, 4))
                             {
                                 DataRow dataRow = dataTable.NewRow();
                                 dataRow["R1"] = array2[j]["R1"];
                                 dataRow["R2"] = array2[j]["R2"];
                                 dataRow["HL"] = array2[j]["HL"];
                                 dataRow["R12"] = array2[j]["R12"];
                                 dataRow["R80"] = array2[j]["R80"];
                                 dataRow["R90"] = array2[j]["R90"];
                                 dataRow["R4"] = array2[j]["R4"];
                                 dataRow["R5"] = array2[j]["R5"];
                                 dataRow["F2"] = array3[i]["F2"];
                                 dataRow["F9"] = array3[i]["F9"];
                                 dataRow["F14"] = array3[i]["F14"];
                                 dataRow["R11"] = array2[j]["R11"];
                                 dataRow["R13"] = array2[j]["R13"];
                                 dataRow["F8"] = array3[i]["F8"];
                                 dataTable.Rows.Add(dataRow);
                             }
                         }
                     }
                     else
                     {
                         if (this.radNewXZ.Checked)
                         {
                             if (array2[j]["R4"].ToString().Trim().Length > 3)
                             {
                                 if (array2[j]["R1"].ToString().Substring(2, 4) != array2[j]["R4"].ToString().Substring(0, 4))
                                 {
                                     DataRow dataRow = dataTable.NewRow();
                                     dataRow["R1"] = array2[j]["R1"];
                                     dataRow["R2"] = array2[j]["R2"];
                                     dataRow["HL"] = array2[j]["HL"];
                                     dataRow["R12"] = array2[j]["R12"];
                                     dataRow["R80"] = array2[j]["R80"];
                                     dataRow["R90"] = array2[j]["R90"];
                                     dataRow["R4"] = array2[j]["R4"];
                                     dataRow["R5"] = array2[j]["R5"];
                                     dataRow["F2"] = array3[i]["F2"];
                                     dataRow["F9"] = array3[i]["F9"];
                                     dataRow["F14"] = array3[i]["F14"];
                                     dataRow["R11"] = array2[j]["R11"];
                                     dataRow["R13"] = array2[j]["R13"];
                                     dataRow["F8"] = array3[i]["F8"];
                                     dataTable.Rows.Add(dataRow);
                                 }
                             }
                         }
                     }
                 }
                 j++;
             }
             if (j == array2.Length)
             {
                 break;
             }
         }
         this.tblResult = dataTable.Copy();
         DataView dataView = new DataView(this.tblResult);
         dataView.Sort = "R5 desc";
         this.gridControl1.DataSource = dataView;
         this.Cursor = Cursors.Default;
         if (this.tblResult.Rows.Count == 0)
         {
             MessageBox.Show(this, "查询不到相关数据,可能由以下原因造成:\r\n1、您输入的条件太多,过于复杂;\r\n2、该产品已被吊销、禁止发布等;\r\n3、不存在该产品;\r\n请您重新输入简单正确条件后继续查询!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             this.txtDJZH.Focus();
         }
     }
 }