private void btnLaws_Click(object sender, EventArgs e)
        {
            A_frmRTAntennaConfig f = null;

            if (IsUse)
            {
                f = new A_frmRTAntennaConfig(IsUse, DateTime.Parse(this.StartDate), DateTime.Parse(this.EndDate), ShowMine);
            }
            else
            {
                f = new A_frmRTAntennaConfig(ShowMine);
            }
            if (f.ShowDialog() == DialogResult.OK)
            {
                this.IsUse    = f.IsUse;
                this.ShowMine = f.ShowMine;
                if (this.IsUse)
                {
                    this.StartDate = f.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
                    this.EndDate   = f.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
                }
                else
                {
                    this.StartDate = "";
                    this.EndDate   = "";
                }
                int       rowcount = 0;
                DataTable dt       = bll.GetRTantennaInfo(station, stationhead, atnenna, type, StartDate, EndDate, ShowMine, CodeSenderAddress, Convert.ToInt32(cmbSelectCounts.SelectedItem), 1, strName, out PageCount, out rowcount);
                dgv.DataSource = dt;
                for (int i = 1; i < dgv.Columns.Count; i++)
                {
                    dgv.Columns[i].ReadOnly = true;
                }
                lblPageCounts.Text = "1";
                lblSumPage.Text    = "/" + PageCount.ToString() + "页";
                txtSkipPage.Text   = "1";
                lblCounts.Text     = "符合筛选条件:共 " + rowcount.ToString() + " 条";
            }
        }
示例#2
0
 private void btnLaws_Click(object sender, EventArgs e)
 {
     A_frmRTAntennaConfig f = null;
     if (IsUse)
     {
         f = new A_frmRTAntennaConfig(IsUse, DateTime.Parse(this.StartDate), DateTime.Parse(this.EndDate), ShowMine);
     }
     else
     {
         f = new A_frmRTAntennaConfig(ShowMine);
     }
     if (f.ShowDialog() == DialogResult.OK)
     {
         this.IsUse = f.IsUse;
         this.ShowMine = f.ShowMine;
         if (this.IsUse)
         {
             this.StartDate = f.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
             this.EndDate = f.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
         }
         else
         {
             this.StartDate = "";
             this.EndDate = "";
         }
         int rowcount = 0;
         DataTable dt = bll.GetRTantennaInfo(station, stationhead, atnenna, type, StartDate, EndDate, ShowMine, CodeSenderAddress, Convert.ToInt32(cmbSelectCounts.SelectedItem), 1,strName, out PageCount, out rowcount);
         dgv.DataSource = dt;
         for (int i = 1; i < dgv.Columns.Count; i++)
         {
             dgv.Columns[i].ReadOnly = true;
         }
         lblPageCounts.Text = "1";
         lblSumPage.Text = "/" + PageCount.ToString() + "页";
         txtSkipPage.Text = "1";
         lblCounts.Text = "符合筛选条件:共 " + rowcount.ToString() + " 条";
     }
 }