// GET: reports/Placements public ActionResult Index(DateTime?stDate, DateTime?endDate) { List <PlacementInfoModel> placementInfos = new List <PlacementInfoModel>(); DateTime sdt = DateTime.Now.Date; DateTime edt = DateTime.Now.Date; if (stDate != null && endDate != null) { sdt = (DateTime)stDate; edt = (DateTime)endDate; } ViewBag.sdt = sdt; ViewBag.edt = edt; try { placementInfos = new PlacemenInfoLogic().GetDetails(sdt, edt); return(View(placementInfos)); } catch (Exception ex) { TempData["alert"] = new AlertBoxModel() { Type = "Error", Message = ex.Message }; return(View(placementInfos)); } }
public ActionResult ChangeStatus(string status, int cid, string message) { try { dashrdku_database db = new dashrdku_database(); FollowUpMaster model = new FollowUpMaster(); UserInfoModel user = Session["userInfo"] as UserInfoModel; model.RefCandidateId = cid; model.FollowUpBy = user.UserRocketName; model.FollowUpDate = DateTime.Now.Date; model.FollowUpTime = DateTime.Now.TimeOfDay; model.FollowUpMessage = message; model.FollowUpStatus = status; db.FollowUpMasters.Add(model); db.SaveChanges(); TempData["alert"] = new AlertBoxModel() { Type = "Success", Message = "Follow Up Message Saved!" }; } catch (Exception ex) { TempData["alert"] = new AlertBoxModel() { Type = "Error", Message = ex.Message }; } return(RedirectToAction("GetTimeLine2")); }
// GET: reports/Marketing public ActionResult Index(DateTime?stDate, DateTime?endDate) { List <CandidateMarketingModel> list = new List <CandidateMarketingModel>(); DateTime sdt = DateTime.Now.Date, edt = DateTime.Now.Date; try { if (stDate != null && endDate != null) { sdt = (DateTime)stDate; edt = (DateTime)endDate; } CandidateMarketingLogic marketingLogic = new CandidateMarketingLogic(); list = marketingLogic.getData(sdt, edt); TempData["alert"] = new AlertBoxModel() { Type = "Success", Message = string.Format("Total {0} Found!", list.Count) }; } catch (Exception ex) { TempData["alert"] = new AlertBoxModel() { Type = "Error", Message = ex.Message }; } ViewBag.sdt = sdt; ViewBag.edt = edt; return(View(list)); }
// GET: reports/CandidateTimeLine public ActionResult Index(DateTime?stDate, DateTime?endDate) { try { DateTime sdt = DateTime.Now.Date; DateTime edt = DateTime.Now.Date; if (stDate != null && endDate != null) { sdt = (DateTime)stDate; edt = (DateTime)endDate; } CandidateTimeLineModelLogic timeLineLogic = new CandidateTimeLineModelLogic(); ViewBag.sdt = sdt; ViewBag.edt = edt; return(View(timeLineLogic.GetList(sdt, edt))); } catch (Exception ex) { TempData["alert"] = new AlertBoxModel() { Type = "Error", Message = ex.Message }; return(View(new List <CandidateTimeLineModel>())); } }
public ActionResult LogIn(string emailid, string password) { string userRole = ""; UserInfoModelLogic userLogic = new UserInfoModelLogic(); UserInfoModel userInfo = userLogic.getUser(emailid, password); if (userInfo != null) { Session["userInfo"] = userInfo; ConfigurationManager.AppSettings.Set("userRole", userInfo.UserRole); TempData["alert"] = new AlertBoxModel() { Type = "Success", Message = "User Login Successfully!" }; return(Redirect(userInfo.defaultUrl)); } TempData["alert"] = new AlertBoxModel() { Type = "Error", Message = "Email Id or Password is Wrong!" }; //if (Response.Cookies["User"] != null) //{ // HttpCookie userInfo = new HttpCookie("User"); // userRole = userInfo["userRole"].ToString(); // //userInfo["UserName"] = "******"; // //userInfo["UserColor"] = "Black"; // //userInfo.Expires.Add(new TimeSpan(0, 1, 0)); // //Response.Cookies.Add(userInfo); //} //else //{ // //@Html.Action("LogOut", "Authentication", new { @area = "User" }) //} return(View()); }