private int SetUserEmploymentInfo(int qty) { List <UserEmploymentDetail> userEmpDetails = UserEmploymentDetailsHelper.GetEmploymentDetailsListByUserId(SessionWrapper.LoggedUser.UserId); if (userEmpDetails.Count > 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "AddEmpControl(" + userEmpDetails.Count + ");", true); FillInformation(userEmpDetails); return(checkEmpDetailsCountWithSelectedQty(userEmpDetails.Count, qty)); } return(qty); //UserProfessionalExprience userProfessionalExprience = UserEmploymentDetailsHelper.GetUserProfessionalExprienceByUserId(SessionWrapper.LoggedUser.UserId); //if (userProfessionalExprience != null) //{ // txtOrgName_1.Text = userProfessionalExprience.OrgName; // txtProfCity_1.Text = userProfessionalExprience.City; // txtTelephoneNumber_1.Text = userProfessionalExprience.Telephone; // ddlStateEmp.Index = userProfessionalExprience.StateId; // List<UserPositionInformed> list = UserEmploymentDetailsHelper.GetPositionInfoList(userProfessionalExprience.UserProfessionalExprienceId); // if (list.Count > 0) // { // ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "AddEmpControl(" + list.Count + ");", true); // FillInformation(list); // } //} }
public static string AddEmploymentDetails(string[] OrganizationName, string[] City, int[] StateId, string[] TelephoneNumber, string[] PositionTitle, string[] Description, int[] StartMonth, int[] StartYear, int[] EndMonth, int[] EndYear, string[] IsAttending) { // DateTime[] StartDate, DateTime?[] EndDate, UserProfileInfo userProfileInfo = new UserProfileInfo(); string message = Constant.CONST_PROFESSIONAL_EXP_FAILURE; if (SessionWrapper.LoggedUser == null) { return(message = Constant.SESSION_EXPIRE); } try { List <UserEmploymentDetail> empDetailList = new List <UserEmploymentDetail>(); UserEmploymentDetail empDetails; int count = 0; while (count < OrganizationName.Length) { if (!String.IsNullOrEmpty(OrganizationName[count])) { empDetails = new UserEmploymentDetail(); empDetails.OrgName = OrganizationName[count].Trim(); empDetails.City = City[count].Trim(); empDetails.Telephone = TelephoneNumber[count].Trim(); empDetails.StateId = StateId[count]; empDetails.PositionTitle = PositionTitle[count].Trim(); empDetails.StartMonth = StartMonth[count]; empDetails.StartYear = StartYear[count]; empDetails.EndMonth = EndMonth[count]; empDetails.EndYear = EndYear[count]; empDetails.Description = Description[count].Trim(); empDetails.IsAttending = Convert.ToBoolean(IsAttending[count]); empDetails.UserId = SessionWrapper.LoggedUser.UserId; empDetailList.Add(empDetails); } count++; } userProfileInfo = UserEmploymentDetailsHelper.SaveUserEmpDetails(empDetailList); } catch { } if (userProfileInfo.IsFirstRecord) { message = Constant.CONST_PROFESSIONAL_ADD_SUCCESS; } else { message = Constant.CONST_PROFESSIONAL_EXP_SUCCESS; } return(message); }
public static string DeleteEmpDetailsById(int EmpDetailsId) { bool isDeleted = false; string message = string.Empty; if (SessionWrapper.LoggedUser == null) { return(message = Constant.SESSION_EXPIRE); } try { isDeleted = UserEmploymentDetailsHelper.DeleteEmpDetailsById(EmpDetailsId); } catch { } if (isDeleted) { message = Constant.CONST_PROFESSIONAL_EXP_DELETE_SUCCESS; } return(message); }
public static string AddEmploymentDetails(string[] OrganizationName, string[] City, int[] StateId, string[] TelephoneNumber, string[] PositionTitle, string[] Description, int[] StartMonth, int[] StartYear, int[] EndMonth, int[] EndYear, string[] IsAttending) { UserProfileInfo userProfileInfo = new UserProfileInfo(); string message = Constant.CONST_PROFESSIONAL_EXP_FAILURE; if (SessionWrapper.LoggedUser == null) { return(message = Constant.SESSION_EXPIRE); } try { List <UserEmploymentDetail> userEmpDetails = new List <UserEmploymentDetail>(); UserEmploymentDetail userEmpDetail; OrderDetails orderDetails = GetSessionOrderDetails(); orderDetails.EmploymentDetailes = new List <EmploymentDetail>(); EmploymentDetail empDetails; List <EmploymentDetail> EmployeeDateGapCheck = new List <EmploymentDetail>(); int count = 0; while (count < OrganizationName.Length) { empDetails = new EmploymentDetail(); userEmpDetail = new UserEmploymentDetail(); empDetails.OrgName = OrganizationName[count].Trim(); empDetails.City = City[count].Trim(); empDetails.Telephone = TelephoneNumber[count].Trim(); empDetails.StateId = StateId[count]; empDetails.PositionTitle = PositionTitle[count].Trim(); empDetails.StartMonth = StartMonth[count]; empDetails.StartYear = StartYear[count]; empDetails.EndMonth = EndMonth[count]; empDetails.EndYear = EndYear[count]; empDetails.IsAttending = Convert.ToBoolean(IsAttending[count]); empDetails.Description = Description[count].Trim(); userEmpDetail.OrgName = OrganizationName[count].Trim(); userEmpDetail.City = City[count].Trim(); userEmpDetail.Telephone = TelephoneNumber[count].Trim(); userEmpDetail.StateId = StateId[count]; userEmpDetail.PositionTitle = PositionTitle[count].Trim(); userEmpDetail.StartMonth = StartMonth[count]; userEmpDetail.StartYear = StartYear[count]; userEmpDetail.EndMonth = EndMonth[count]; userEmpDetail.EndYear = EndYear[count]; userEmpDetail.Description = Description[count].Trim(); userEmpDetail.IsAttending = Convert.ToBoolean(IsAttending[count]); userEmpDetail.UserId = SessionWrapper.LoggedUser.UserId; userEmpDetails.Add(userEmpDetail); orderDetails.EmploymentDetailes.Add(empDetails); empDetails.EmploymentDetailId = count; string month = empDetails.StartMonth != 0 ? empDetails.StartMonth.ToString("00") : "01"; string year = empDetails.StartYear != 0 ? empDetails.StartYear.ToString(): "1900"; string startDate = "01/" + month + "/" + year; DateTime StartDate = DateTime.ParseExact(startDate, "MM/dd/yyyy", null); empDetails.StartDate = StartDate; month = empDetails.EndMonth != 0 ? empDetails.EndMonth.ToString("00") : "01"; year = empDetails.EndYear != 0 ? empDetails.EndYear.ToString() : "1900"; string endDate = "01/" + month + "/" + year; DateTime EndDate = DateTime.ParseExact(endDate, "MM/dd/yyyy", null); empDetails.EndDate = EndDate; EmployeeDateGapCheck.Add(empDetails); count++; } SessionWrapper.OrderDetail = orderDetails; if (userEmpDetails.Count != 0) { userProfileInfo = UserEmploymentDetailsHelper.SaveUserEmpDetails(userEmpDetails); if (userProfileInfo.IsFirstRecord) { message = Constant.CONST_PROFESSIONAL_ADD_SUCCESS; } else { message = Constant.CONST_PROFESSIONAL_EXP_SUCCESS; } } else { message = Constant.CONST_PROFESSIONAL_ADD_SUCCESS; } } catch { } return(message); }
public static List <int> GetProfessionalIdList() { return(UserEmploymentDetailsHelper.GetProfessionalIdList(SessionWrapper.LoggedUser.UserId)); }