Beispiel #1
0
 public FilterTask(Models.OverTimeManagement overtimeManagement)
 {
     this.Description     = string.Format("{0} - {1}", overtimeManagement.CommonDate.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture), overtimeManagement.Requester.LookupValue);
     this.Requester       = overtimeManagement.Requester;
     this.Department      = overtimeManagement.CommonDepartment;
     this.CreatedDate     = overtimeManagement.Created;
     this.DueDate         = overtimeManagement.RequestDueDate == DateTime.MinValue ? overtimeManagement.CommonDate : overtimeManagement.RequestDueDate; // TODO
     this.ItemId          = overtimeManagement.ID;
     this.ItemApprovalUrl = $"{DelegationManager.BuildListItemApprovalUrl2(OverTimeManagementList.ListUrl, this.ItemId)}&Source=/SitePages/Overview.aspx";
     this.InitModule(OverTimeManagementList.ListUrl);
 }
Beispiel #2
0
 /// <summary>
 /// Initialize from Overtime Management object.
 /// </summary>
 /// <param name="shiftManagement">The Overtime Management object.</param>
 public Delegation(Models.OverTimeManagement overtimeManagement, SPWeb currentWeb = null) : this(currentWeb)
 {
     if (currentWeb == null)
     {
         currentWeb = SPContext.Current.Web;
     }
     this.ListItemDescription = string.Format("{0} - {1}", overtimeManagement.CommonDate.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture), overtimeManagement.Requester.LookupValue);
     this.Requester           = overtimeManagement.Requester;
     this.Department          = overtimeManagement.CommonDepartment;
     this.ListItemCreatedDate = overtimeManagement.Created;
     this.ListUrl             = OverTimeManagementList.ListUrl;
     this.ListItemID          = overtimeManagement.ID;
     this.ListItemApprovalUrl = DelegationManager.BuildListItemApprovalUrl2(this.ListUrl, this.ListItemID);
     this.InitModuleName(OverTimeManagementList.ListUrl);
 }