public List <SAP_VendorCreationLog> GetVendorCreationLogs(string requestId)
 {
     //return SAP_VendorCreationLog.Where(d => d.RequestId == requestId && d.Activity != "Start" && d.Activity != "Return").OrderBy(d => d.Id).ToList();
     return(SAP_VendorCreationLog.Where(d => d.RequestId == requestId).OrderBy(d => d.Id).ToList());
 }
        public SAP_VendorCreationLog GetVendorCreationLog(SAP_VendorCreation main, string activity, string taskId)
        {
            var log = GetVendorCreationLog(requestId: main.RequestId, activity: activity, taskId: taskId);

            if (log == null)
            {
                log = new SAP_VendorCreationLog {
                    Id = 0
                }
            }
            ;
            log.CreatedDate    = DateTime.Now;
            log.AccountNoIBAN  = main.AccountNoIBAN;
            log.ActiveActivity = main.ActiveActivity;
            log.ActiveUserId   = main.ActiveUserId;
            log.ActiveUserName = main.ActiveUserName;
            log.Activity       = main.Activity;
            log.Address        = main.Address;
            log.BankAddress    = main.BankAddress;

            log.BenificaryName = main.BenificaryName;
            log.BusinessName   = main.BusinessName;
            log.City           = main.City;
            log.Classification = main.Classification;
            log.CompanyType    = main.CompanyType;

            log.ContactPerson = main.ContactPerson;
            log.Country       = main.Country;
            log.CreatedDate   = main.CreatedDate;

            log.Email         = main.Email;
            log.EmailSent     = main.EmailSent;
            log.EmailSentDate = main.EmailSentDate;
            log.FaxNo         = main.FaxNo;

            log.IncidentNo    = main.IncidentNo;
            log.InitiatedDate = main.InitiatedDate;

            log.InitiatorId   = main.InitiatorId;
            log.InitiatorName = main.InitiatorName;
            log.IssuedBy      = main.IssuedBy;
            log.IssuedOn      = main.IssuedOn;
            log.NatureOfWork  = main.NatureOfWork;


            log.NTNNo                  = main.NTNNo;
            log.PaymentCurrency        = main.PaymentCurrency;
            log.PaymentMethod          = main.PaymentMethod;
            log.PaymentTerms           = main.PaymentTerms;
            log.PeriodUpto             = main.PeriodUpto;
            log.PhoneNo                = main.PhoneNo;
            log.PostalCode             = main.PostalCode;
            log.Qualification          = main.Qualification;
            log.QuestionnaireCompleted = main.QuestionnaireCompleted;
            log.RegNA                  = main.RegNA;
            log.RequestId              = main.RequestId;
            log.RequestType            = main.RequestType;
            log.Reason                 = main.Reason;

            log.ReturnEmails = main.ReturnEmails;
            log.RoutingNo    = main.RoutingNo;
            log.SAPVendorId  = main.SAPVendorId;
            log.State        = main.State;
            log.Status       = main.Status;
            log.SwiftCode    = main.SwiftCode;
            log.TaskId       = main.TaskId;
            log.TaxRegNo     = main.TaxRegNo;

            log.ToEmails    = main.ToEmails;
            log.UpdatedDate = main.UpdatedDate;
            log.UserId      = main.UserId;
            log.UserName    = main.UserName;

            log.WithholdingTax = main.WithholdingTax;
            log.Remarks        = main.Remarks;

            return(log);
        }

        #endregion
    }
 public SAP_VendorCreationLog GetVendorCreationLog(string requestId, string activity, string taskId)
 {
     return(SAP_VendorCreationLog.Where(d => d.RequestId == requestId && d.Activity == activity && d.TaskId == taskId).FirstOrDefault());
 }