Basit Nisar

Basit Nisar

  • 1.6k
  • 84
  • 11.3k

the payload request value to be assigned in th true conditi

May 5 2023 8:26 AM
try
{
    DateTime _LastModifiedDateTC  ;
    List<CIPHApprovedPutModel> timeSheetApprovedView = new List<CIPHApprovedPutModel>();
    foreach (var Item in timeSheetApprovedView.TimeCards)
    {
        if (Item.IsStateFarm == true)
        {
           _LastModifiedDateTC = Global.GetTimecardLastModifiedDate(Item.TimeCardID, (int)InvoiceSourceTypes.TimeCard).GetValueOrDefault();  
        }
        else
        {
           _LastModifiedDateTC = Global.GetTimecardLastModifiedDate(Item.TimeCardID, (int)InvoiceSourceTypes.PerHour).GetValueOrDefault();
        }
        if (Item.LastModifiedDate == _LastModifiedDateTC)
        {
             //how to assign values when condition matches
         }
    }
   
    List<int> StateFarmTimeCardIDs = timeSheetApprovedView.TimeCards.Where(x => x.IsStateFarm)?.Select(x => x.TimeCardID)?.ToList();
    List<int> OtherTimeCardIDs = timeSheetApprovedView.TimeCards.Where(x => !x.IsStateFarm)?.Select(x => x.TimeCardID)?.ToList();

    int? BaseStateProvinceID = null;

 


Answers (2)