private void btnSave_Click(object sender, EventArgs e) { try { _popup.Description = memoDescription.Text; _popup.Active = cbxActive.Checked; _popup.CreationDate = PROF_IT.Common.Convert.DateFunctions.DateToStrDate(dteStartDate.DateTime); _popup.Repeation = (Enumeration.Frequency.TimeFrequency)cmbFrequency.EditValue; if (txtTimeOfDay.Text.Length == 7) { _popup.Time = "0" + txtTimeOfDay.Text.Replace(":", ""); } else { _popup.Time = txtTimeOfDay.Text.Replace(":", ""); } //Save parent to have the correct GUID ID new BL.Internal.Popup().Save(PopupMember); //Link Popup to all users UserObjectCollection users = new BL.Internal.User().GetAll(); foreach (UserObject user in users) { PopupUserObject popupUser = new PopupUserObject(); popupUser.Popup = _popup; popupUser.State = PROF_IT.Common.Enumerations.ObjectState.Created; popupUser.User = user; _popup.PopupUsers.Add(popupUser); } //Save Parent with childs new BL.Internal.Popup().Save(PopupMember); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }
private void btnSetUknownSecurityParameters_Click(object sender, EventArgs e) { if (DevExpress.XtraEditors.XtraMessageBox.Show("Are you sure you want to set the unknown security parameters?", "Set unknown security parameters", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { BL.Internal.User bl; UserObjectCollection users; try { bl = new BL.Internal.User(); users = bl.GetAll(); foreach (UserObject user in users) { bl.SetUnknownSecurityParameters(user); } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } } }
private void btnSave_Click(object sender, EventArgs e) { try { _popup.Description = memoDescription.Text; _popup.Active = cbxActive.Checked; _popup.CreationDate = PROF_IT.Common.Convert.DateFunctions.DateToStrDate(dteStartDate.DateTime); _popup.Repeation = (Enumeration.Frequency.TimeFrequency)cmbFrequency.EditValue; if (txtTimeOfDay.Text.Length == 7) _popup.Time = "0" + txtTimeOfDay.Text.Replace(":", ""); else _popup.Time = txtTimeOfDay.Text.Replace(":", ""); //Save parent to have the correct GUID ID new BL.Internal.Popup().Save(PopupMember); //Link Popup to all users UserObjectCollection users = new BL.Internal.User().GetAll(); foreach (UserObject user in users) { PopupUserObject popupUser = new PopupUserObject(); popupUser.Popup = _popup; popupUser.State = PROF_IT.Common.Enumerations.ObjectState.Created; popupUser.User = user; _popup.PopupUsers.Add(popupUser); } //Save Parent with childs new BL.Internal.Popup().Save(PopupMember); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }