/// <summary> /// 编辑数据 /// </summary> private void EditData(WindowStatus status) { if (status != WindowStatus.Edit && status != WindowStatus.Copy) { return; } string title = "编辑"; string menuId = "UCContactsEdit"; if (status == WindowStatus.Copy) { title = "复制"; menuId = "UCContactsCopy"; } if (dgvContacts.CurrentRow == null) { MessageBoxEx.Show(string.Format("请选择要{0}的数据!", title)); return; } string con_id = ContactsID; if (string.IsNullOrEmpty(con_id)) { return; } UCContactsAddOrEdit add = new UCContactsAddOrEdit(status, con_id, this); base.addUserControl(add, string.Format("联系人档案-{0}", title), menuId + con_id, this.Tag.ToString(), this.Name); }
/// <summary> /// 编辑 /// </summary> private void Edit() { UCContactsAddOrEdit partsEdit = new UCContactsAddOrEdit(WindowStatus.Edit, contID, uc); deleteMenuByTag(this.Tag.ToString(), uc.Name); base.addUserControl(partsEdit, "联系人档案-编辑", "UCVehicleModelsEdit" + contID, this.Tag.ToString(), this.Name); }
/// <summary> /// 新增数据 /// </summary> private void AddData() { UCContactsAddOrEdit add = new UCContactsAddOrEdit(WindowStatus.Add, null, this); base.addUserControl(add, "联系人档案-新增", "UCContactsAdd", this.Tag.ToString(), this.Name); }