/// <summary>物料号变更带出物料描述和单位 /// 物料号变更带出物料描述和单位 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lueMaterialCode_EditValueChanged(object sender, EventArgs e) { string materialName = Convert.ToString(this.lueMaterialCode.GetColumnValue("MATERIAL_NAME")); this.txtMaterialDescription.Text = materialName; MaterialReqOrReturnEntity entity = new MaterialReqOrReturnEntity(); DataSet ds = entity.GetMaterialstTui(lueWorkOrderNo.Text.Trim(), lueMaterialCode.Text.Trim(), ""); if (string.IsNullOrEmpty(entity.ErrorMsg)) { lueMblnr.Properties.DataSource = ds.Tables[0]; this.lueMblnr.Properties.DisplayMember = "MBLNR"; this.lueMblnr.Properties.ValueMember = "MBLNR"; this.lueMblnr.ItemIndex = 0; this.lueMblnr.Properties.PopupFormSize = new Size(200, 120); } string llief = Convert.ToString(this.lueMblnr.GetColumnValue("LLIEF")); string sumqty = Convert.ToString(this.lueMblnr.GetColumnValue("SUMQTY")); string unit = Convert.ToString(this.lueMblnr.GetColumnValue("UNIT")); lueSupplierName.Text = llief; txtSum.Text = sumqty; txtUnit.Text = unit; }
private void lueMaterialCode_EditValueChanged(object sender, EventArgs e) { string materialName = Convert.ToString(this.lueMaterialCode.GetColumnValue("MATERIAL_NAME")); //string unit = Convert.ToString(this.lueMaterialCode.GetColumnValue("UNIT")); this.txtMaterialDescription.Text = materialName; //this.txtUnit.Text = unit; MaterialReqOrReturnEntity entity = new MaterialReqOrReturnEntity(); DataSet ds = entity.GetMaterialstTui("", lueMaterialCode.Text.Trim(), ""); if (string.IsNullOrEmpty(entity.ErrorMsg)) { lueMblnr.Properties.DataSource = ds.Tables[0]; this.lueMblnr.Properties.DisplayMember = "MBLNR"; this.lueMblnr.Properties.ValueMember = "MBLNR"; this.lueMblnr.ItemIndex = 0; this.lueMblnr.Properties.PopupFormSize = new Size(200, 120); } else { this.lueMblnr.Properties.DataSource = null; this.lueMblnr.EditValue = string.Empty; this.lueMblnr.Text = string.Empty; } }
/// <summary>绑定物料编码。 /// 绑定物料编码。 /// </summary> private void BindMaterialCode() { string orderNumber = this.lueWorkOrderNo.Text; this.lueMaterialCode.EditValue = string.Empty; this.txtMaterialDescription.Text = string.Empty; MaterialReqOrReturnEntity entity = new MaterialReqOrReturnEntity(); DataSet ds = entity.GetMaterialstTui(orderNumber); if (string.IsNullOrEmpty(entity.ErrorMsg)) { this.lueMaterialCode.Properties.DataSource = ds.Tables[0]; this.lueMaterialCode.Properties.DisplayMember = "MATERIAL_CODE"; this.lueMaterialCode.Properties.ValueMember = "MATERIAL_CODE"; this.lueMaterialCode.ItemIndex = 0; this.lueMaterialCode.Properties.PopupFormSize = new Size(220, 140); } else { this.lueMaterialCode.Properties.DataSource = null; this.lueMaterialCode.EditValue = string.Empty; this.txtMaterialDescription.Text = string.Empty; } }