public bool funNew(string iConnection, string iUserName, string iOfficeSpaceId, string Database) { Connection = iConnection; UserName = iUserName; OfficeSpaceId = iOfficeSpaceId; DatabaseName = Database; frmEmployee frm = new frmEmployee(); frm.Command = "New"; frm.funLoad(); bool bOutput = false; if (frm.ShowDialog() == DialogResult.OK) { bOutput = true; } if (!frm.IsDisposed) { frm.Close(); frm.Dispose(); } return(bOutput); }