Example #1
0
 public void LoadData(int pageIndex)
 {
     SuperTrendFilter filter = new SuperTrendFilter();
     filter.PageIndex = 1;
     filter.Date = DateTime.Now.ToShortDateString();
     filter.Hour = "";
     filter.Minute = "";
     if (!bgworkerLoad.IsBusy)
     {
         cmd.ShowOpaqueLayer(this, 125, true);
         bgworkerLoad.RunWorkerAsync(filter);
     }
 }
Example #2
0
 /// <summary>
 /// 上一页
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void lnkPrev_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     DateTime dtTime = DateTime.Now;
     if (!string.IsNullOrEmpty(tbxDate.Text.Trim())
            && !DateTime.TryParse(tbxDate.Text.Trim(), out dtTime))
     {
         MessageBox.Show("请选择正确的日期!");
     }
     else
     {
         int pageIndex = int.Parse(lblPage.Text.Trim().Split('/')[0]) - 1;
         pageIndex = pageIndex < 1 ? 1 : pageIndex;
         string date = tbxDate.Text.Trim();
         string hour = ddlHour.Text.Replace("时", "").Trim();
         string minute = ddlMinute.Text.Replace("分钟", "").Trim();
         hour = hour == "全部" ? "" : hour;
         minute = minute == "全部" ? "" : minute;
         SuperTrendFilter filter = new SuperTrendFilter();
         filter.PageIndex = pageIndex;
         filter.Date = date;
         filter.Hour = hour;
         filter.Minute = minute;
         if (!bgworkerLoad.IsBusy)
         {
             cmd.ShowOpaqueLayer(this, 125, true);
             bgworkerLoad.RunWorkerAsync(filter);
         }
     }
 }
Example #3
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnQuery_Click(object sender, EventArgs e)
 {
     DateTime dtTime = DateTime.Now;
     if (string.IsNullOrEmpty(tbxDate.Text.Trim())
         && ddlHour.Text.Trim() == "全部"
         && ddlMinute.Text.Trim() == "全部")
     {
         MessageBox.Show("请选择一个条件进行查询!");
     }
     else if (!string.IsNullOrEmpty(tbxDate.Text.Trim())
         && !DateTime.TryParse(tbxDate.Text.Trim(), out dtTime))
     {
         MessageBox.Show("请选择正确的日期!");
     }
     else
     {
         string date = tbxDate.Text.Trim();
         string hour = ddlHour.Text.Replace("时", "").Trim();
         string minute = ddlMinute.Text.Replace("分钟", "").Trim();
         hour = hour == "全部" ? "" : hour;
         minute = minute == "全部" ? "" : minute;
         SuperTrendFilter filter = new SuperTrendFilter();
         filter.PageIndex = 1;
         filter.Date = date;
         filter.Hour = hour;
         filter.Minute = minute;
         if (!bgworkerLoad.IsBusy)
         {
             cmd.ShowOpaqueLayer(this, 125, true);
             bgworkerLoad.RunWorkerAsync(filter);
         }
     }
 }