/// <summary> 复制事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void UCPurchaseBillManang_CopyEvent(object sender, EventArgs e) { string purchase_billing_id = string.Empty; List<string> listField = GetSelectedRecord(); if (listField.Count == 0) { MessageBoxEx.Show("请选择要复制的数据!"); return; } if (listField.Count > 1) { MessageBoxEx.Show("一次只可以复制一条数据!"); return; } purchase_billing_id = listField[0].ToString(); UCPurchaseBillAddOrEdit UCPurchaseBillCopy = new UCPurchaseBillAddOrEdit(WindowStatus.Copy, purchase_billing_id, this); base.addUserControl(UCPurchaseBillCopy, "采购开单-复制", "UCPurchaseBillCopy" + purchase_billing_id + "", this.Tag.ToString(), this.Name); }
/// <summary> 编辑事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void UCPurchaseBillManang_EditEvent(object sender, EventArgs e) { string purchase_billing_id = string.Empty; bool IsHandle = true; List<string> listField = GetSelectedRecordByEditDelete(ref IsHandle); if (IsHandle) { if (listField.Count == 0) { MessageBoxEx.Show("请选择要编辑的数据!"); return; } if (listField.Count > 1) { MessageBoxEx.Show("一次只可以编辑一条数据!"); return; } purchase_billing_id = listField[0].ToString(); UCPurchaseBillAddOrEdit UCPurchaseBillEdit = new UCPurchaseBillAddOrEdit(WindowStatus.Edit, purchase_billing_id, this); base.addUserControl(UCPurchaseBillEdit, "采购开单-编辑", "UCPurchaseBillEdit" + purchase_billing_id + "", this.Tag.ToString(), this.Name); } }
/// <summary> 添加事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void UCPurchaseBillManang_AddEvent(object sender, EventArgs e) { UCPurchaseBillAddOrEdit UCPurchaseBillAdd = new UCPurchaseBillAddOrEdit(WindowStatus.Add, null, this); base.addUserControl(UCPurchaseBillAdd, "采购开单-添加", "UCPurchaseBillAdd", this.Tag.ToString(), this.Name); }