private void btnAddRecordType_Click(object sender, EventArgs e) { AddRecordType addrt = new AddRecordType(); if (addrt.ShowDialog() != DialogResult.Cancel) { this.IsModify = true; rtb = new RecordTypeBiz(); initListRecordType(); } }
private void menuAddRecordType_Click(object sender, EventArgs e) { AddRecordType addrt = new AddRecordType(); addrt.CustomizeId = Convert.ToInt32(listRecordType.SelectedItems[0].SubItems[0].Text.Trim()); if (addrt.ShowDialog() != DialogResult.Cancel) { this.IsModify = true; rtb = new RecordTypeBiz(); initListRecordType(); } }
private void menuModifyRecordType_Click(object sender, EventArgs e) { AddRecordType addrt = new AddRecordType(); if (listRecordType.SelectedItems.Count > 0) { if (listRecordType.SelectedItems[0].SubItems[0].Text.Trim() != "0") { addrt.Modify(Convert.ToInt32(listRecordType.SelectedItems[0].SubItems[0].Text.Trim())); if (addrt.ShowDialog() != DialogResult.Cancel) { this.IsModify = true; rtb = new RecordTypeBiz(); initListRecordType(); } } else { MessageBox.Show("不能修改总类型!"); } } }