Пример #1
0
        private psaUser.psaWorkdayResource Assemble(LinqToExcel.Row myRow)
        {
            psaUser.psaWorkdayResource myResource = new psaUser.psaWorkdayResource();
            myResource.careerInterests = myRow["Career Interests"].ToString();
            myResource.citizenship = myRow["Citizenship Status"].ToString();
            myResource.city = myRow["Work Address - City"].ToString();
            myResource.continuousServiceDate = DateTime.Parse(myRow["Continuous Service Date"].ToString());
            myResource.continuousServiceDateSpecified = true;
            myResource.costCenter = myRow["Cost Center - ID"].ToString();
            myResource.country = myRow["Work Address - Country"].ToString();
            string tmpEmail = myRow["Email - Primary Work"].ToString().Replace("@", "=");
            myResource.email = tmpEmail + "@example.com";
            myResource.firstName = myRow["Preferred Name - First Name"].ToString();
            myResource.lastName = myRow["Preferred Name - Last Name"].ToString();
            myResource.location = myRow["Work Address - Country"].ToString(); ;// myRow["Location"].ToString();
            myResource.managerId = myRow["Manager - Level 01 ID"].ToString();
            myResource.mobile = myRow["Mobile Phone"].ToString();
            myResource.phone = myRow["Phone - Primary Work"].ToString();
            myResource.startDate = DateTime.Parse(myRow["Original Hire Date"].ToString());
            myResource.startDateSpecified = true;
            myResource.state = myRow["Work Address - State/Province"].ToString();
            myResource.stateWitholding = myRow["State Withholding (Resident) - State"].ToString();

            string tempStreet = myRow["Work Address - Formatted Line 1"].ToString().TrimEnd() + "," + myRow["Work Address - Formatted Line 2"].ToString().TrimEnd() + "," + myRow["Work Address - Formatted Line 3"].ToString().TrimEnd();
            myResource.street = tempStreet;

            myResource.title = myRow["Position"].ToString();
            myResource.workdDayEmployeeId = myRow["Employee ID"].ToString();
            myResource.zip = myRow["Work Address - Postal Code"].ToString();
            myResource.currencyISOCode = myRow["Currency for Primary Position"].ToString();
            myResource.company = getCompanyData(myResource.costCenter);//"Manhattan Associates - India";
            myResource.contingentWorkerType = myRow["Contingent Worker Type"].ToString();
            myResource.departmentOwnerId = myRow["Manager - Level 03 ID"].ToString();

            DateTime temp;

            bool success = DateTime.TryParse(myRow["Last Day of Work"].ToString(), out temp);

            myResource.endDate = temp;
            myResource.endDateSpecified = success;

            myResource.groupLeadAltManagerId = myRow["Manager - Level 02 ID"].ToString();
            myResource.isContingentWorker = myRow["Worker is Contingent Worker"].Cast<bool>();
            myResource.isContingentWorkerSpecified = true;
            myResource.resourceRole = myRow["Work Experience"].ToString();
            myResource.techCode = myRow["Workday Account"].ToString();
            myResource.tenure = myRow["Length of Service in Months"].ToString();
            myResource.workerType = myRow["Position Worker Type"].ToString();

            //?????????????????????????????????
            //myResource.resourceStatus = myRow[""].ToString();
            // myResource.level = myRow[""].ToString();
            //myResource.timeType = myRow[""].ToString();
            myResource.weeklyScheduledHours = "40";// myRow[""].ToString();

            return myResource;
        }
Пример #2
0
 /// <remarks/>
 public void upsertWorkdayResourceAsync(psaWorkdayResource[] resources, object userState) {
     if ((this.upsertWorkdayResourceOperationCompleted == null)) {
         this.upsertWorkdayResourceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupsertWorkdayResourceOperationCompleted);
     }
     this.InvokeAsync("upsertWorkdayResource", new object[] {
                 resources}, this.upsertWorkdayResourceOperationCompleted, userState);
 }
Пример #3
0
 /// <remarks/>
 public void upsertWorkdayResourceAsync(psaWorkdayResource[] resources) {
     this.upsertWorkdayResourceAsync(resources, null);
 }