private void btnReAssignFollowUp_Click(object sender, EventArgs e) { if (gvFollowUp.RowCount < 1) return; var _item = gvFollowUp.GetFocusedRow() as CTCampaignFollowUp; if (_item == null) return; ReAssignFollowUp _control = new ReAssignFollowUp(_item.id); _control.AfterSave += new ReAssignFollowUp.AfterSaveEventHandler(_control_AfterSave); PopupDialog _popup = new PopupDialog(); _popup.FormBorderStyle = FormBorderStyle.FixedSingle; _popup.MinimizeBox = false; _popup.MaximizeBox = false; _popup.StartPosition = FormStartPosition.CenterScreen; _popup.Text = "Re-assign follow-ups"; _popup.Controls.Add(_control); _popup.ClientSize = new Size(_control.Width + 2, _control.Height + 2); _popup.ShowDialog(this.ParentForm); }
private void _control_AfterSave(ReAssignFollowUp.AfterSaveArgs e) { gvFollowUp.SetRowCellValue(gvFollowUp.FocusedRowHandle, "assigned_user", e.UserName); }