Exemple #1
0
 public static string GetCriteria(QueryParameter queryPara)
 {
     StringBuilder criteria = new StringBuilder();
     if (!queryPara.isToday)
     {
         criteria.Append(CC.CommbineLocationCriteria(queryPara.southLat.ToString(), queryPara.northLat.ToString(), queryPara.westLon.ToString(), queryPara.eastLon.ToString()));
     }
     criteria.Append(CC.CombineTimeCriteria(queryPara.photoTime, queryPara.createTime));
     if (!queryPara.hasDelete)
     {
         criteria.Append(CC.CombineIsExistedCriteria(1));
     }
     return criteria.ToString();
 }
Exemple #2
0
 /// <summary>
 /// 初始化系统变量并验证其正确性
 /// </summary>
 /// <returns></returns>
 QueryParameter VerifyVariable()
 {
     QueryParameter queryPara = new QueryParameter();
     queryPara.eastLon = double.Parse(this.tbEast.Text);
     queryPara.westLon = double.Parse(this.tbWest.Text);
     queryPara.southLat = double.Parse(this.tbSouth.Text);
     queryPara.northLat = double.Parse(this.tbNorth.Text);
     if (this.dtPhotoTime.Checked)
     {
         DateTime dt = DateTime.Parse(this.dtPhotoTime.Text);
         queryPara.photoTime = String.Format("{0:yyyyMMdd}", dt);
     }
     if (this.dtCreateTime.Checked)
     {
         queryPara.createTime = this.dtCreateTime.Text;
     }
     queryPara.hasDelete = cbDeleted.Checked;
     return queryPara;
 }
Exemple #3
0
 private void QueryAndBinding(QueryParameter queryPara)
 {
     criteria = DataHelper.GetCriteria(queryPara);
     QueryAndBinding(criteria);
 }
Exemple #4
0
 /// <summary>
 /// 今天到达的数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void btnToday_Click(object sender, EventArgs e)
 {
     QueryParameter queryPara = new QueryParameter();
     queryPara.isToday = true;
     queryPara.createTime = DateTime.Now.ToString();
     queryPara.hasDelete = cbDeleted.Checked;
     QueryAndBinding(queryPara);
 }