public void AddFeedback(string message) { var feedbackService = new FeedbackServiceClient(); feedbackService.AddFeedback(message); feedbackService.Close(); }
public ActionResult ManagerFeedback() { if (Session["userIds"] != null) { string userIds = Session["userIds"].ToString(); var splitUserIds = userIds.Split(','); var useridList = new int[splitUserIds.Length]; var roleList = new int[splitUserIds.Length]; for (var i = 0; i < splitUserIds.Length; i++) { useridList[i] = int.Parse(splitUserIds[i].Split('_')[0]); roleList[i] = int.Parse(splitUserIds[i].Split('_')[1]); } Session["role"] = 3; Session["type"] = 2; CreateManagerFeedback(useridList, roleList); } var mgrFeedback = new bExcellent.mvc.Models.Feedback(); var createdFeedback = (CreatedFeedback[])Session["CreatedFeedbacks"]; int feedbackId = createdFeedback[0].FeedBackId; var feedback = new FeedbackServiceClient(); var returnValue = feedback.GetLastSavedQuestion(feedbackId); var teamList = (CreatedFeedback[])Session["CreatedFeedbacks"]; mgrFeedback.TeamMebers = teamList.ToList(); mgrFeedback.GetLastSavedQuestion = returnValue; return(View(mgrFeedback)); }
/// <summary> /// /// </summary> /// <returns></returns> public JsonResult GetPoeResultMode() { var common = new FeedbackServiceClient(); if (Session["SelectedPoe"] != null) { var returnValue = common.GetPoEResultMode(int.Parse(Session["id"].ToString()), int.Parse(Session["SelectedPoe"].ToString())); Session["PoEResultMode"] = returnValue.ToString(); var role = GetCurrentUserRoleUpdated(); var resultmode = new PoeResultMode { Status = returnValue, Role = role }; return(JsonResponse(resultmode)); } else { var returnValue = common.GetPoEResultMode(int.Parse(Session["id"].ToString()), 0); Session["PoEResultMode"] = returnValue.ToString(); var resultmode = new PoeResultMode { Status = returnValue, Role = 0 }; return(JsonResponse(resultmode)); } }
public JsonResult GetPracticeArea() { var feedback = new FeedbackServiceClient(); var profileviews = feedback.GetPracticeArea(int.Parse(Session["SelectedPoe"].ToString())); return(JsonResponse(profileviews)); }
public JsonResult GetDevPriorityQuestions() { var feedback = new FeedbackServiceClient(); var returnValue = feedback.GetDevPriorityQuestions(Convert.ToInt32(Session["id"]), int.Parse(Session["SelectedPoe"].ToString())); return(JsonResponse(returnValue)); }
public JsonResult getYourMentees() { var feedback = new FeedbackServiceClient(); var yourMentors = feedback.GetPathfindersIds(int.Parse(Session["id"].ToString()), int.Parse(Session["SelectedPoe"].ToString()), 2); return(JsonResponse(yourMentors)); }
public ActionResult Updateuserdetails(string emailId, string password) { AuthenticationClient authentication = new AuthenticationClient(); FeedbackServiceClient feedback = new FeedbackServiceClient(); // var email = Request.Form["emailid"]; //var password = Request.Form["password"]; string _username = emailId; string _password = password; if (!string.IsNullOrEmpty(_username) && !string.IsNullOrEmpty(_password)) { var returnValue = authentication.AuthenticateUser(_username, _password); var loggedinUser = returnValue.currentUser; if (returnValue.IsAuthenticated) { return(JsonResponse(true)); } else { return(JsonResponse(false)); } } return(null); }
public IReadOnlyList <FeedbackDto> GetFeedbacks() { var feedbackService = new FeedbackServiceClient(); var feedbacks = feedbackService.GetFeedbacks(); feedbackService.Close(); return(feedbacks.Select(x => new FeedbackDto(x.Id, x.Message, x.Date)).ToList()); }
public ActionResult SelfFeedback() { Session["role"] = 1; Session["type"] = 1; CreateTakeFeedback(); var createdFeedback = (CreatedFeedback[])Session["CreatedFeedbacks"]; int feedbackId = createdFeedback[0].FeedBackId; var feedback = new FeedbackServiceClient(); var returnValue = feedback.GetLastSavedQuestion(feedbackId); var selfFb = new bExcellent.mvc.Models.Feedback(); selfFb.GetLastSavedQuestion = returnValue; return(View(selfFb)); }
public JsonResult GetPoeResultModeUpdated() { var common = new FeedbackServiceClient(); var returnValue = common.GetPoEResultMode(int.Parse(Session["id"].ToString()), 0); Session["PoEResultMode"] = returnValue.ToString(); var resultmode = new PoeResultMode { Status = returnValue, Role = 0 }; return(JsonResponse(resultmode)); }
public void CreateFeedback(NewFeedbackRequest request) { // CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-IN"); //Session["userIds"] = null; if (Session["CreatedFeedbacks"] == null) { request.Subscriptionid = int.Parse(Session["subid"].ToString()); var feedback = new FeedbackServiceClient(); var retunValue = feedback.CreateFeedback(request); Session["CreatedFeedbacks"] = retunValue; //CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-OUT"); } else { // CommonController.Log(Session["id"].ToString() + "::" + "CreateFeedback-SessionNULL"); } }
public void UpdateFeedbackStatus(SavePOEResultRequest request, int?con = 0) { try { // CommonController.Log(Session["id"].ToString() + "::" + "UpdateFeedbackStatus-IN"); var feedback = new FeedbackServiceClient(); feedback.UpdateFeedbackStatus(request); // CommonController.Log(Session["id"].ToString() + "::" + "UpdateFeedbackStatus-OUT"); } catch (Exception e) { var t = con + 1; if (t <= 2) { UpdateFeedbackStatus(request, t); } } }
public JsonResult ProfileView() { var feedback = new FeedbackServiceClient(); if (Session["DevPriorities"] != null) { var profileviews = feedback.GetPracticeArea(int.Parse(Session["SelectedPoe"].ToString())); var devPriorities = (DevelopmentPriorities[])Session["DevPriorities"]; foreach (var priorities in devPriorities) { //var selectmodule = profileviews.FirstOrDefault(a => a.ModuleOrderNumber == priorities.ModuleOrder).Questions; //var selectedQuestion = // selectmodule.FirstOrDefault(a => a.QuestionId == priorities.QuestionId); profileviews[(priorities.ModuleOrder)].Questions.FirstOrDefault(a => a.QuestionId == priorities.QuestionId).IsBarrierQuestion = true;//[priorities.QuestionId].IsBarrierQuestion = true; //selectedQuestion.IsBarrierQuestion = true; } return(JsonResponse(profileviews)); } return(JsonResponse(null)); }
public JsonResult GetQuestions(int moduleId, int?con = 0) { try { // CommonController.Log(Session["id"].ToString() + "::" + "GetQuestions-IN"); var feedback = new FeedbackServiceClient(); var returnValue = feedback.GetQuestions(moduleId); // CommonController.Log(Session["id"].ToString() + "::" + "GetQuestions-OUT"); return(JsonResponse(returnValue)); } catch (Exception e) { var t = con + 1; if (t <= 2) { return(GetQuestions(moduleId, t)); } else { return(null); } } }
public JsonResult GetPracticeAreaList(int?con = 0) { try { var feedback = new FeedbackServiceClient(); // CommonController.Log(Session["id"].ToString() + "::" + "GetPracticeArea-IN"); if (Session["SelectedPoe"] != null) { var returnValue = feedback.GetModuleQuestions(Convert.ToInt32(Session["id"]), int.Parse(Session["SelectedPoe"].ToString())); if (Session["PracticeArea"] == null) { Session["PracticeArea"] = returnValue; } // CommonController.Log(Session["id"].ToString() + "::" + "GetPracticeArea-OUT"); return(JsonResponse(returnValue)); } else { //CommonController.Log(Session["id"].ToString() + "::" + "GetPracticeArea-SessionNull"); return(null); } } catch (Exception e) { var t = con + 1; if (t <= 2) { return(GetPracticeAreaList(t)); } else { return(null); } } }
private ActionResult AuthenticatedUser(AuthenticationWCF.User loggedinUser) { var trailPrd = int.Parse(ConfigurationManager.AppSettings["trailPrd"].ToString()); var feedback = new FeedbackServiceClient(); var common = new SignupClient(); var suser = common.GetUserById(loggedinUser.UserId); Session["user"] = suser; var loggeduserName = loggedinUser.FirstName + " " + loggedinUser.LastName; ViewData["username"] = loggeduserName; Session["Uname"] = loggeduserName; Session["emailid"] = loggedinUser.EmailAddress; Session["id"] = loggedinUser.UserId; Session["domain"] = loggedinUser.EmailAddress.Split('@')[1]; var request = (LoginRequest)Session["request"]; var userSub = new CommonClient(); var ownsub = userSub.GetMySubscription(Session["emailid"].ToString()).FirstOrDefault(); if (request != null) { if (request.IsGuest) { FeedbackWCF.UserPOEMapping user = new FeedbackWCF.UserPOEMapping(); user = feedback.GetUserdetailsByMappingId(request.RequestFor); CreatedFeedback[] createdFb = new CreatedFeedback[] { new CreatedFeedback { FeedBackId = request.FeedbackId, Teammember = user, } }; Session["CreatedFeedbacks"] = createdFb; Session["SelectedPoe"] = request.PoeId; if (request.Type == 4) { return(RedirectToAction("CustomerFeedback", "Feedback")); } else { Session["errormsg"] = "You don't have the permission"; return(RedirectToAction("Login", "Home")); } } else { Session["errormsg"] = "You don't have the permission"; return(RedirectToAction("Login", "Home")); } } else { CommonClient commonnetwrok = new CommonClient(); CommonWCF.Network networkresult = commonnetwrok.GetDefaultUserSubscription(loggedinUser.EmailAddress); if (networkresult != null) { SignUpWCF.Network network = common.GetNetworkById(networkresult.Subscriptionid); if (network.Plan == 1) { //if (network.CreatedOn.AddDays(trailPrd) < DateTime.Now) //{ // if (network.EmailId == loggedinUser.EmailAddress) // { // return RedirectToAction("Account", "Home"); // } // else // { // var userSubscription = // commonnetwrok.GetUserSubscriptions(loggedinUser.EmailAddress).FirstOrDefault // ( // a => a.Subscriptionid != networkresult.Subscriptionid); // if (userSubscription != null) // { // Session["subid"] = -1;// userSubscription.Subscriptionid; // Session["network"] = null;// userSubscription; // if (Session["Mode"] != null && int.Parse(Session["Mode"].ToString()) == 5 && ownsub != null && Session["SelectedPoes"] != null) // { // Session["subid"] = ownsub.Subscriptionid; // SetSelectNetwork(ownsub.Subscriptionid); // return RedirectToAction("AddMember", "Signup", new { task = "add", resource = "dd" }); // } // else // { // Session["CartList"] = null; // return RedirectToAction("Start", "Home"); // //Response.Redirect("/signup/new/Add"); // } // } // else // { // Session["errormsg"] = "Your Account has been Inactive"; // return RedirectToAction("Login", "Home"); // } // } //} //else //{ Session["subid"] = networkresult.Subscriptionid; Session["network"] = network; if (Session["Mode"] != null && int.Parse(Session["Mode"].ToString()) == 5 && ownsub != null && Session["SelectedPoes"] != null) { SetSelectNetwork(ownsub.Subscriptionid); Session["subid"] = ownsub.Subscriptionid; return(RedirectToAction("AddMember", "Signup", new { task = "add", resource = "dd" })); } else { Session["CartList"] = null; return(RedirectToAction("Start", "Home")); //Response.Redirect("/signup/new/Add"); } // } } else { Session["subid"] = -1; // networkresult.Subscriptionid; Session["network"] = null; // network; if (Session["Mode"] != null && int.Parse(Session["Mode"].ToString()) == 5 && ownsub != null && Session["SelectedPoes"] != null) { SetSelectNetwork(ownsub.Subscriptionid); Session["subid"] = ownsub.Subscriptionid; Session["CartList"] = null; return(RedirectToAction("AddMember", "Signup", new { task = "add", resource = "dd" })); } else { Session["CartList"] = null; return(RedirectToAction("Start", "Home")); //Response.Redirect("/signup/new/Add"); } } } else { Session["errormsg"] = "You don't have the permission"; return(RedirectToAction("Login", "Home")); } } /* ViewData["fullname"] = ((AuthenticationResult)Session["UserDetail"]).currentUser.FirstName + " " + * ((AuthenticationResult)Session["UserDetail"]).currentUser.LastName; * ViewData["userid"] = ((AuthenticationResult)Session["UserDetail"]).currentUser.UserId.ToString().Trim(); * return View("Default");*/ //Response.Redirect("../client/Default.aspx"); }