Machete.Domain.WorkOrder.getTabRef C# (CSharp) Method

getTabRef() public method

Retrieve API string to edit specific WO
public getTabRef ( ) : string
return string
        public string getTabRef()
        {
            return "/WorkOrder/Edit/" + Convert.ToString(this.ID);
        }

Usage Example

 /// <summary>
 /// Returns Work Order object - presented on the WorkOrder Details tab
 /// </summary>
 /// <param name="wo">WorkOrder</param>
 /// <param name="showWorkers">bool flag determining whether the workers associated with the WorkOrder should be retrieved</param>
 /// <returns>Work Order </returns>
 public object dtResponse( WorkOrder wo, bool showWorkers)
 {
     int ID = wo.ID;
     return new
     {
         tabref = wo.getTabRef(),
         tablabel = Machete.Web.Resources.WorkOrders.tabprefix + wo.getTabLabel(),
         EID = Convert.ToString(wo.EmployerID), // Note: Employer ID appears to be unused
         WOID = System.String.Format("{0,5:D5}", wo.paperOrderNum), // TODO: investigate why PaperOrderNum is used - shouldn't this be the Order # from the WO Table?
         dateTimeofWork = wo.dateTimeofWork.ToString(),
         status = lcache.textByID(wo.status, CI.TwoLetterISOLanguageName),
         WAcount = wo.workAssignments.Count(a => a.workOrderID == ID).ToString(),
         contactName = wo.contactName,
         workSiteAddress1 = wo.workSiteAddress1,
         zipcode = wo.zipcode,
         dateupdated = System.String.Format("{0:MM/dd/yyyy HH:mm:ss}", wo.dateupdated), // Note: Date Updated appears to be unused
         updatedby = wo.Updatedby,
         transportMethod = lcache.textByID(wo.transportMethodID, CI.TwoLetterISOLanguageName), // Note: Transport Method appears to be unused
         displayState = _getDisplayState(wo), // Note: Display State appears to be unused
         onlineSource = wo.onlineSource ? Shared.True : Shared.False,
         emailSentCount = wo.Emails.Where(e => e.statusID == Email.iSent || e.statusID == Email.iReadyToSend).Count(),
         emailErrorCount = wo.Emails.Where(e => e.statusID == Email.iTransmitError).Count(),
         recordid = wo.ID.ToString(), // Note: Work Order ID appears not to be used
         workers = showWorkers ? // Note: Workers appears to not be used
                 from w in wo.workAssignments
                 select new
                 {
                     WID = w.workerAssigned != null ? (int?)w.workerAssigned.dwccardnum : null,
                     name = w.workerAssigned != null ? w.workerAssigned.Person.fullName() : null,
                     skill = lcache.textByID(w.skillID, CI.TwoLetterISOLanguageName),
                     hours = w.hours,
                     wage = w.hourlyWage
                 } : null
     };
 }
All Usage Examples Of Machete.Domain.WorkOrder::getTabRef