public override void MapFromList(ListItem item, bool includeChildren = false) { base.MapFromList(item); this.SharePointList = SharePointHelper.ToStringNullSafe(item["SharePointList"]); this.ViewName = SharePointHelper.ToStringNullSafe(item["ViewName"]); this.RecipientType = SharePointHelper.ToStringNullSafe(item["RecipientType"]); this.RecipientColumn = SharePointHelper.ToStringNullSafe(item["RecipientColumn"]); this.Subject = SharePointHelper.ToStringNullSafe(item["Subject"]); this.Frequency = SharePointHelper.ToStringNullSafe(item["Frequency"]); this.Body = SharePointHelper.ToStringNullSafe(item["Body"]); this.NextRunDate = Convert.ToDateTime(item["NextRunDateTime"]); this.LastRunDate = Convert.ToDateTime(item["LastRunDateTime"]); this.LastRunStatus = SharePointHelper.ToStringNullSafe(item["LastRunStatus"]); this.IncludeCc = Convert.ToBoolean(item["IncludeCC"]); this.Enabled = Convert.ToBoolean(item["Enabled"]); this.Application = SharePointHelper.ToStringNullSafe(item["Application"]); var dict = new Dictionary <string, string>(); dict = Settings.GetAppEmailFieldsDef(dict); if (Title == NotificationTypes.EXTENSION_DECISION || Title == NotificationTypes.EXTENSION_RECEIVED || Title == NotificationTypes.EXTENSION_REQUEST) { dict = ExtensionRequest.GetEmailFieldsDef(dict); } else { dict = OGEForm450.GetEmailFieldsDef(dict); } this.TemplateFields = dict; }
public void Extend(ExtensionRequest item) { this.DueDate = item.ExtensionDate; this.DaysExtended += item.DaysRequested; this.Save(); }
public void Deactivate() { try { // Set Current Form to Canceled if (this.CurrentFormId > 0) { var form = OGEForm450.Get(this.CurrentFormId); form.FormStatus = Constants.FormStatus.CANCELED; form.Save(); } } catch (Exception ex) { // Couldn't find form, ignore exception } // Set Pending Extensions to Canceled var extensions = ExtensionRequest.GetPendingExtensions(this.CurrentFormId); foreach (ExtensionRequest ext in extensions) { ext.Status = Constants.ExtensionStatus.CANCELED; ext.Save(); } this.InactiveDate = DateTime.Now; }
public void RemoveExtensions() { // Set Pending Extensions to Canceled var extensions = ExtensionRequest.GetPendingExtensions(this.Id); foreach (ExtensionRequest ext in extensions) { ext.Status = Constants.ExtensionStatus.CANCELED; ext.Save(); } }