//货品新增 private void btnAddMaterial_Click(object sender, EventArgs e) { frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.Invalue = 1; frmMaterialAdd.MaterialAdd("", ""); }
private void gridControl1_DoubleClick(object sender, EventArgs e) { if (gridView1.RowCount > 0) { string guid = ((DataRowView)(gridView1.GetFocusedRow())).Row[0].ToString(); frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.MaterialEdit(guid); } }
//编辑 private void btnEdit_Click(object sender, EventArgs e) { if (gridView1.RowCount > 0) { //int intRow = gridView1.GetSelectedRows()[0]; string guid = ((DataRowView)(gridView1.GetFocusedRow())).Row[0].ToString(); frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.MaterialEdit(guid); } }
//添加 private void btnAdd_Click(object sender, EventArgs e) { if (treeView1.SelectedNode != null) { frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.MaterialAdd(treeView1.SelectedNode.Tag.ToString(), treeView1.SelectedNode.Text); } else { this.ShowAlertMessage("请先选择货品分类后再添加!"); } }
public int Invalue = 0;//如果为1则是从调拨单那边新增的 /// <summary> /// 货品新增 /// </summary> public frmMaterialAdd() { InitializeComponent(); frmmaterialadd = this; }