Hello
I have created on custom sharepoint web part. I am trying to create Employee using C# code. I am using "zDP_UPR00102SI" store procedure. for inserting data in to GP. Data inserted successfully but it does not shows on GP. Following are parameters i have passed to store procedure.
command.Parameters.AddWithValue("@EMPLOYID", string.IsNullOrEmpty(_employee.EmployeeID) ? string.Empty : _employee.EmployeeID);
command.Parameters.AddWithValue("@FRSTNAME", string.IsNullOrEmpty(_employee.FirstName) ? string.Empty : _employee.FirstName);
command.Parameters.AddWithValue("@LASTNAME", string.IsNullOrEmpty(_employee.LastName) ? string.Empty : _employee.LastName);
command.Parameters.AddWithValue("@MIDLNAME", string.IsNullOrEmpty(_employee.MiddleName) ? string.Empty : _employee.MiddleName);
command.Parameters.AddWithValue("@EMPLOYMENTTYPE", Convert.ToInt16(_employee.EmploymentType));
command.Parameters.AddWithValue("@GENDER", Convert.ToInt16(_employee.Gender));
command.Parameters.AddWithValue("@SOCSCNUM", string.IsNullOrEmpty(_employee.SocialSecurity) ? string.Empty : _employee.SocialSecurity);
command.Parameters.AddWithValue("@JOBTITLE", string.IsNullOrEmpty(_employee.Position) ? string.Empty : _employee.Position);
command.Parameters.AddWithValue("@MARITALSTATUS", Convert.ToInt16(_employee.MaritalStatus));
command.Parameters.AddWithValue("@DEPRTMNT", string.IsNullOrEmpty(_employee.DepartmentName) ? string.Empty : _employee.DepartmentName);
command.Parameters.AddWithValue("@STRTDATE", string.IsNullOrEmpty(_employee.DateOfHire) ? string.Empty : _employee.DateOfHire);
command.Parameters.AddWithValue("@BRTHDATE", string.IsNullOrEmpty(_employee.DOB) ? string.Empty : _employee.DOB);
command.Parameters.AddWithValue("@EMPLCLAS", string.IsNullOrEmpty(_employee.ClassID) ? string.Empty : _employee.ClassID);
command.Parameters.AddWithValue("@USERDEF1", string.IsNullOrEmpty(_employee.Segment) ? string.Empty : _employee.Segment);
command.Parameters.AddWithValue("@SUPERVISORCODE_I", string.IsNullOrEmpty(_employee.SupervisorCode) ? string.Empty : _employee.SupervisorCode);
command.Parameters.AddWithValue("@ADRSCODE", string.IsNullOrEmpty(_employee.AddressType) ? string.Empty : _employee.AddressType);
#region UnUsedParameters
command.Parameters.AddWithValue("@INACTIVE", 0);
command.Parameters.AddWithValue("@ETHNORGN", 0);
command.Parameters.AddWithValue("@Calc_Min_Wage_Bal", 0);
command.Parameters.AddWithValue("@DIVISIONCODE_I", "");
command.Parameters.AddWithValue("@LOCATNID", "");
command.Parameters.AddWithValue("@WCACFPAY", "");
command.Parameters.AddWithValue("@ACTINDX", 0);
command.Parameters.AddWithValue("@WKHRPRYR", 0);
command.Parameters.AddWithValue("@DEMPINAC", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@RSNEMPIN", "");
command.Parameters.AddWithValue("@MINETPAY", 0);
command.Parameters.AddWithValue("@SUTASTAT", "");
command.Parameters.AddWithValue("@WRKRCOMP", "");
command.Parameters.AddWithValue("@ATACRVAC", 0);
command.Parameters.AddWithValue("@VACCRAMT", 0);
command.Parameters.AddWithValue("@VACCRMTH", 0);
command.Parameters.AddWithValue("@VACAPRYR", 0);
command.Parameters.AddWithValue("@VACAVLBL", 0);
command.Parameters.AddWithValue("@WRNVCNFLSBLWZR", 0);
command.Parameters.AddWithValue("@ATACRSTM", 0);
command.Parameters.AddWithValue("@STMACMTH", 0);
command.Parameters.AddWithValue("@SKTMACAM", 0);
command.Parameters.AddWithValue("@SIKTIMAV", 0);
command.Parameters.AddWithValue("@SKTMHPYR", 0);
command.Parameters.AddWithValue("@WRNSTFLSBLWZR", 0);
command.Parameters.AddWithValue("@USERDEF2", 0);
command.Parameters.AddWithValue("@BENADJDATE", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@LASTDAYWORKED_I", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@BIRTHDAY", 0);
command.Parameters.AddWithValue("@BIRTHMONTH", 0);
command.Parameters.AddWithValue("@SPOUSE", "");
command.Parameters.AddWithValue("@SPOUSESSN", "");
command.Parameters.AddWithValue("@NICKNAME", "");
command.Parameters.AddWithValue("@ALTERNATENAME", "");
command.Parameters.AddWithValue("@HRSTATUS", "");
command.Parameters.AddWithValue("@DATEOFLASTREVIEW_I", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@DATEOFNEXTREVIEW_I", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@BENEFITEXPIRE_I", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@HANDICAPPED", 0);
command.Parameters.AddWithValue("@VETERAN", 0);
command.Parameters.AddWithValue("@VIETNAMVETERAN", 0);
command.Parameters.AddWithValue("@DISABLEDVETERAN", 0);
command.Parameters.AddWithValue("@UNIONEMPLOYEE", 0);
command.Parameters.AddWithValue("@SMOKER_I", 0);
command.Parameters.AddWithValue("@CITIZEN", 0);
command.Parameters.AddWithValue("@VERIFIED", 0);
command.Parameters.AddWithValue("@I9RENEW", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@Primary_Pay_Record", "");
command.Parameters.AddWithValue("@CHANGEBY_I", "");
command.Parameters.AddWithValue("@CHANGEDATE_I", DateTime.Now.Date);
command.Parameters.AddWithValue("@NOTEINDX", 0);
command.Parameters.AddWithValue("@NOTEINDX2", 0);
command.Parameters.AddWithValue("@UNIONCD", 0);
command.Parameters.AddWithValue("@RATECLSS", 0);
command.Parameters.AddWithValue("@FEDCLSSCD", "");
command.Parameters.AddWithValue("@OTHERVET", "");
command.Parameters.AddWithValue("@Military_Discharge_Date", Convert.ToDateTime("1900-01-01 00:00:00.000"));
command.Parameters.AddWithValue("@EMPLSUFF", "");
command.Parameters.AddWithValue("@STATUSCD", "");
command.Parameters.AddWithValue("@Workflow_Approval_Status", "");
command.Parameters.AddWithValue("@Workflow_Priority", "");
command.Parameters.AddWithValue("@AFSMVET", "");
command.Parameters.AddWithValue("@RECSEPVET", "");
command.Parameters.AddWithValue("@DEX_ROW_ID", 0);
#endregion
Thanks
Krunal Jani
*This post is locked for comments