public void OutOfOfficeReply(atriumDB.ActivityRow activity) { if (myFM.AtMng.GetSetting(AppBoolSetting.useOutOfOfficeFunctionality)) { if (activity.Communication) { docDB.DocumentRow docr = myFM.GetDocMng().DB.Document.FindByDocId(activity.DocId); docDB.RecipientRow[] recips = docr.GetRecipientRows(); officeDB.OfficerRow officerRow; foreach (docDB.RecipientRow rr in recips) { if (rr.Type != "0" && !rr.IsOfficerIdNull()) { //check to see if they are out of the office //always load in case person just set their out off office flag officerRow = (officeDB.OfficerRow)myFM.AtMng.OfficeMng.GetOfficer().Load(rr.OfficerId); //jll 2018-04-24 - if recipient is external, this check should never happen. if (officerRow != null && officerRow.OutOfOffice) { if (DateTime.Now >= officerRow.OutOfOfficeStartDate && DateTime.Now <= officerRow.OutOfOfficeEndDate) { // do out of office activity ActivityConfig.ACSeriesRow acsr = myFM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(myFM.AtMng.GetSetting(AppIntSetting.OutOfOfficeNotification)); CurrentACE = null; AutoAC(activity, acsr, officerRow.OfficerId, ACEngine.RevType.OutOfOffice, false); } } } } } } }
private void btnOK_Click(object sender, EventArgs e) { try { if (multiSelect) { if (multiDoc.GetRecipientRows().Length == 0) { this.DialogResult = System.Windows.Forms.DialogResult.Cancel; } } else if (!hasDoc) { SetSelectedContact(SelectedPanel); } this.Close(); } catch (Exception x) { UIHelper.HandleUIException(x); } }
protected override void AfterChange(DataColumn dc, DataRow row) { atriumDB.ActivityBFRow dr = (atriumDB.ActivityBFRow)row; switch (dc.ColumnName) { case ActivityFields.Completed: //if (dr.Completed && dr.isMail && dr.isRead == false) //JLL: 2018-07-19 removed ismail flag. mark as read whenever it's completed. if (dr.Completed && dr.isRead == false) { dr.isRead = true; } if (dr.Completed) { dr.CompletedByID = this.myA.AtMng.WorkingAsOfficer.OfficerId; dr.CompletedDate = DateTime.Now; } else { dr.SetCompletedByIDNull(); dr.SetCompletedDateNull(); } dr.EndEdit(); break; case "BFType": switch (dr.BFType) { //case 1: //Office BFs // dr.SetBFOfficerIDNull(); // dr.SetRoleCodeNull(); // dr.ForOfficeId = myA.AtMng.OfficeLoggedOn.OfficeId; // break; case 2: //Direct - wipe out Role; update ForOfficeId to LoggedOnOffice dr.BFOfficerID = myA.AtMng.WorkingAsOfficer.OfficerId; dr.SetRoleCodeNull(); //dr.ForOfficeId = myA.AtMng.OfficeLoggedOn.OfficeId; break; case 7: //Roles dr.SetBFOfficerIDNull(); dr.SetRoleCodeNull(); //dr.ForOfficeId = myA.AtMng.OfficeLoggedOn.OfficeId; break; case 8: //Recipient //JLL: 2009/07/27 Handling of proper diarizing without FILE - e.g. LA09.04 if (dr.ActivityRow.IsDocIdNull()) { throw new Exception("Workflow is not configured properly. Please contact an administrator. \n\nError: Cannot use BF Type Recipient without a document"); } else { docDB.DocumentRow docr = myA.GetDocMng().DB.Document.FindByDocId(dr.ActivityRow.DocId); //if (docr.GetRecipientRows().Length == 0) // myA.GetDocMng().GetRecipient().LoadByDocId(docr.DocId); bool notfound = true; foreach (docDB.RecipientRow rr in docr.GetRecipientRows()) { if (rr.Type == "1") { if (!rr.IsOfficerIdNull()) { dr.BFOfficerID = rr.OfficerId; notfound = false; } } } if (notfound) { throw new Exception("Workflow is not configured properly. Please contact an administrator. \n\nError: Cannot use BF Type Recipient without an officer as the document \"To\" recipient"); } } break; } break; } }