//根据变更编号查询 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 query_Product_Click(object sender, EventArgs e) { Condition condition = PDM_ALL_PRODUCT.Create().CreateCondition(); if (!string.IsNullOrEmpty(no_Product.Text)) { condition.AddElement("PRODUCTNO", no_Product.Text, ElementType.Match); } if (!string.IsNullOrEmpty(version_Product.Text)) { condition.AddElement("VERSION", version_Product.Text); } if (!string.IsNullOrEmpty(type_Product.Text)) { condition.AddElement("PRODUCTTYPE", type_Product.Text); } if (!string.IsNullOrEmpty(status_Product.Text)) { condition.AddElement("STATUS", status_Product.Text); } if (!string.IsNullOrEmpty(mperson_Product.Text)) { condition.AddElement("MODIFIER", mperson_Product.Text, ElementType.Match); } if (!string.IsNullOrEmpty(createDate_Product.Text)) { condition.AddElement("MODIFYTIME", createDate_Product.Text); } condition.AddElement("PRODUCTLEVEL", 2); PDM_ALL_PRODUCT t_product = new PDM_ALL_PRODUCT(); t_product.PRODUCTNO = no_Product.Text; t_product.VERSION = version_Product.Text; t_product.PRODUCTTYPE = type_Product.Text; t_product.STATUS = status_Product.Text; t_product.MODIFIER = mperson_Product.Text; t_product.CREATETIME = createDate_Product.Text; t_product.MODIFYTIME = modifyDate_Product.Text; t_product.MODELTYPE = model_Product.Text; m_partsList = m_partsService.GetProductList(t_product, this.AdvanceQueryString); this.DialogResult = DialogResult.OK; }
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; }