//根据变更编号查询 private void toolQuery_Click(object sender, EventArgs e) { Condition condition = PDM_PJTCHANGE.Create().CreateCondition(); if (!string.IsNullOrEmpty(this.toolQueryNo.Text)) { condition.AddElement("PJTCHANGENO", this.toolQueryNo.Text, ElementType.Match); } //this.dgv_ChangeList.DataSource = null; this.dgv_ChangeList.DataSource = _pjtChangeService.GetList(condition); }
private void btn_Ok_Click(object sender, EventArgs e) { Condition condition = PDM_PJTCHANGE.Create().CreateCondition(); if (!string.IsNullOrEmpty(this.changeNo.Text)) { condition.AddElement("PJTCHANGENO", changeNo.Text); } if (!string.IsNullOrEmpty(changeTime.Text.Trim())) { condition.AddElement("CHANGETIME", changeTime.Text + " 00:00:00", ElementType.GreaterThanAndEqualTo); condition.AddElement("CHANGETIME", changeTime.Text + " 23:59:59", ElementType.LessThanAndEqualTo); } if (!string.IsNullOrEmpty(changePerson.Text)) { condition.AddElement("CHANGEPERSON", changePerson.Text); } if (!string.IsNullOrEmpty(changeStatus.Text)) { condition.AddElement("CHANGESTATUS", changeStatus.Text, ElementType.Match); } if ((changeAssoNo.Checked ^ changeAssoYes.Checked)) { if (changeAssoNo.Checked) { condition.AddElement("IFASSO", 0); } else { condition.AddElement("IFASSO", 1); } } _changeList = _changeService.GetList(condition); this.DialogResult = DialogResult.OK; }