private void btnAdd_Click(object sender, EventArgs e) { FormBSCostTypeInput formCostTypeInput = new FormBSCostTypeInput(); formCostTypeInput.Tag = "Add"; //添加状态 formCostTypeInput.Owner = this; formCostTypeInput.ShowDialog(); }
private void btnUpdate_Click(object sender, EventArgs e) { if (tvCostType.SelectedNode != null) { if (tvCostType.SelectedNode.Tag != null) { FormBSCostTypeInput formCostTypeInput = new FormBSCostTypeInput(); formCostTypeInput.Tag = "Edit"; //编辑状态 formCostTypeInput.Owner = this; formCostTypeInput.ShowDialog(); } } }