private void btnPartCreate_Click(object sender, EventArgs e) { client = Common.Util.Service; if (lstPartsType.Text.ToString().Equals("产品")) { ProductsAddForm form = new ProductsAddForm(Common.Util.paramsEntity(draw)); form.ShowDialog(); } if (lstPartsType.Text.ToString().Equals("半成品")) { PartsAddForm form = new PartsAddForm(Common.Util.paramsEntity(draw)); form.ShowDialog(); } if (lstPartsType.Text.ToString().Equals("材料")) { MaterailAddForm form = new MaterailAddForm(Common.Util.paramsEntity(draw)); form.ShowDialog(); } }