// GET: Login public ActionResult Index(string MobileNo, string LeadId, string LoginID) { try { if (!string.IsNullOrEmpty(LoginID) && !string.IsNullOrEmpty(LeadId)) { var userDetails = LR.GetUserDetailsByLoginID(LoginID); Session["UserSession"] = userDetails; return(RedirectToAction("Index", "CustomerOnBoarding", new { @LeadId = LeadId })); } if (!string.IsNullOrEmpty(MobileNo)) { var userDetails = LR.GetUserDetailsByLoginID(MobileNo); if (userDetails != null) { if (userDetails.GroupId == "1088") { Session["UserSession"] = userDetails; return(RedirectToAction("Index", "Home")); } } } } catch (Exception ex) { newexception.AddException(ex, ""); } LoginModel objLogin = new LoginModel(); return(View(objLogin)); }
public ActionResult GetReportData(string searchData) { var userDetails = (CustomerLoginDetail)Session["UserSession"]; List <TelecallerReport> lsttelecaller = new List <TelecallerReport>(); try { JavaScriptSerializer json_serializer = new JavaScriptSerializer(); json_serializer.MaxJsonLength = int.MaxValue; object[] objData = (object[])json_serializer.DeserializeObject(searchData); foreach (Dictionary <string, object> item in objData) { DateTime fromdt = Convert.ToDateTime(item["frmDate"]); DateTime todt = Convert.ToDateTime(item["toDate"]); lsttelecaller = TR.GetTelecallerReportData(fromdt, todt, userDetails.connectionString, userDetails.GroupId); } } catch (Exception ex) { newexception.AddException(ex, userDetails.GroupId); return(null); } return(PartialView("_TelecallerList", lsttelecaller)); }
public bool AddDashboardCustomerLogin(DashboardCustomerLogin objdashboardlogin) { bool status = false; CustomerLoginDetail objdashboardlogindeatils = new CustomerLoginDetail(); try { using (var context = new CommonDBContext()) { CustomerLoginDetail objcustexist = new CustomerLoginDetail(); objdashboardlogindeatils = context.CustomerLoginDetails.Where(x => x.LoginId == objdashboardlogin.MobileNo && x.GroupId == objdashboardlogin.GroupId).FirstOrDefault(); if (objdashboardlogindeatils == null) { objcustexist.UserId = objdashboardlogin.GroupId; objcustexist.LoginId = objdashboardlogin.MobileNo; objcustexist.Password = "******"; objcustexist.UserName = objdashboardlogin.CustomerName; if (objdashboardlogin.LoginType == "02") { objcustexist.LevelIndicator = "02"; objcustexist.CreatedDate = DateTime.UtcNow.Date; objcustexist.LoginStatus = true; objcustexist.UserStatus = true; } else { objcustexist.LevelIndicator = "04"; objcustexist.CreatedDate = DateTime.UtcNow.Date; objcustexist.LoginStatus = true; objcustexist.UserStatus = true; objcustexist.OutletOrBrandId = objdashboardlogin.OutletOrBrandId; } objcustexist.GroupId = objdashboardlogin.GroupId; objcustexist.EmailId = null; objcustexist.MobileNo = null; objcustexist.LoginType = null; context.CustomerLoginDetails.AddOrUpdate(objcustexist); context.SaveChanges(); status = true; } else { status = false; } } } catch (Exception ex) { newexception.AddException(ex, objdashboardlogin.GroupId); } return(status); }
// GET: Account public ActionResult Index() { try { LMSBL.DBModels.TblUser model = new LMSBL.DBModels.TblUser(); model = (LMSBL.DBModels.TblUser)Session["UserSession"]; return(View(model)); } catch (Exception ex) { newException.AddException(ex); return(View()); } }
// GET: Reports public ActionResult Index() { try { TblUser sessionUser = (TblUser)Session["UserSession"]; var objReportModel = rpt.GetMainReportForLearner(sessionUser.UserId, sessionUser.TenantId); return(View("LearnerReportMain", objReportModel)); } catch (Exception ex) { newException.AddException(ex); return(View("LearnerReportMain")); } }
public ActionResult MyAssignments() { try { var model = (TblUser)Session["UserSession"]; HomeViewModel homeViewModel = new HomeViewModel(); homeViewModel.lstActivities = hm.GetAllLearnerActivities(model.TenantId, model.UserId, "Total"); return(View("MyLearning", homeViewModel.lstActivities)); } catch (Exception ex) { newException.AddException(ex); return(View("MyLearning")); } }
/// <summary> /// Add exception details to database - extra parameters which are to be added when using this on the website. /// /// Connection string is in settings.xml /// </summary> /// <param name="ex"></param> /// <param name="logIt"></param> /// <remarks></remarks> private static void LogExceptionToDatabase(Exception exc, bool logIt, Guid?userID) { try { if (logIt) { string innerException = ""; if (exc.InnerException == null) { innerException = ""; } else { innerException = exc.InnerException.ToString(); } Exceptions.AddException(System.DateTime.Now, exc.Source, exc.Message.ToString(), innerException, exc.StackTrace.ToString(), exc.TargetSite.ToString(), userID); } } catch (Exception ex) { //if there is an invalid UserID an exception happens here (f.k. INSERT if user id is not in asp_users table) System.Diagnostics.Debug.Print(ex.ToString() + "\n" + "userID: " + userID.ToString()); //verify that all parameters are valid, including userID System.Diagnostics.Debug.Print("BLL.LogExceptionToDatabase function(). verify that all parameters are valid, including userID"); System.Diagnostics.Debug.Print(System.DateTime.Now.ToString()); System.Diagnostics.Debug.Print(ex.Source); System.Diagnostics.Debug.Print(ex.InnerException.ToString()); System.Diagnostics.Debug.Print(ex.Message); ExceptionHandling.LogException(ref ex); System.Diagnostics.Debug.Print(ex.TargetSite.ToString()); System.Diagnostics.Debug.Print(ex.StackTrace.ToString()); System.Diagnostics.Debug.Print(userID.ToString()); } }
public ActionResult EditTemplate(int id) { try { List <tblTemplateAssign> TemplateDetails = new List <tblTemplateAssign>(); TemplateDetails = etr.GetEmailTemplateAssignsById(id); return(View("UpdateEmailTemplate", TemplateDetails[0])); } catch (Exception ex) { newException.AddException(ex); TempData["Message"] = "-1"; return(RedirectToAction("Index")); } }
public ActionResult UserAuthentication(LoginModel objLogin) { try { CustomerLoginDetail userDetails = new CustomerLoginDetail(); userDetails = LR.AuthenticateUser(objLogin); if (userDetails != null) { if (userDetails.LoginId != null && (userDetails.LoginType == "5" || userDetails.LoginType == "8" || userDetails.LoginType == "1") && userDetails.LoginId != "123") { Session["UserSession"] = userDetails; return(RedirectToAction("Index", "Lead")); } else { TempData["InvalidUserMessage"] = "User Does not Exist"; } } else { TempData["InvalidUserMessage"] = "User Does not Exist"; } } catch (Exception ex) { newexception.AddException(ex, ""); TempData["InvalidUserMessage"] = ex.Message; return(RedirectToAction("Index")); } return(View("Index")); }
public List <SellingProductValue> GetTop5SellingProductValue(string GroupId, string connstr) { List <SellingProductValue> lstTop5SessingProductValue = new List <SellingProductValue>(); try { using (var context = new BOTSDBContext(connstr)) { lstTop5SessingProductValue = context.Database.SqlQuery <SellingProductValue>("sp_BOTS_Top5_SellingProductValue").ToList <SellingProductValue>(); } } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(lstTop5SessingProductValue); }
public ActionResult GetCustomerStatus(string mobileNo, string GroupId) { CustomerDetailwithFeedback obj = new CustomerDetailwithFeedback(); try { obj = FBR.GetCustomerInfo(mobileNo, GroupId); } catch (Exception ex) { newexception.AddException(ex, "Get feedbackcust"); } return(new JsonResult() { Data = obj, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }); }
public ActionResult AddSalesLead(LeadViewModel objData) { int LeadId = 0; try { objData.lstBillingPartner = CR.GetBillingPartner(); objData.lstcategory = CR.GetRetailCategory(); objData.lstStates = CR.GetStates(); objData.lstCity = CR.GetCity(); var userDetails = (CustomerLoginDetail)Session["UserSession"]; if(objData.sALES_TblLeads.LeadId == 0) { var exist = SLR.isMobileNoExist(objData.sALES_TblLeads.MobileNo); if(exist) { ViewData["Status"] = "exist"; return View("AddLead", objData); } } objData.sALES_TblLeads.AddedDate = DateTime.Now; objData.sALES_TblLeads.AddedBy = userDetails.LoginId; objData.sALES_TblLeads.AssignedLead = userDetails.LoginId; var meetingType = objData.sALES_TblLeads.MeetingType; LeadId = SLR.AddSalesLead(objData.sALES_TblLeads); if (meetingType == "salesdone") { string url = ConfigurationManager.AppSettings["BOTSURL"].ToString(); //string url = "https://blueocktopus.in/bots?LoginID=" + userDetails.LoginId + "&LeadId=" + objData.sALES_TblLeads.LeadId + ""; url = url+"?LoginID=" + userDetails.LoginId + ""; ViewData["LeadId"] = LeadId; ViewData["URL"] = url; } } catch (Exception ex) { newexception.AddException(ex, ""); TempData["error"] = "Error Occured"; // return View("AddLead"); } ViewData["Status"] = LeadId; return View("AddLead", objData); }
// GET: Tenant public ActionResult Index() { try { List <TblTenant> lstAllTenants = new List <TblTenant>(); lstAllTenants = tr.GetAllTenants(); return(View(lstAllTenants)); } catch (Exception ex) { newException.AddException(ex); return(View()); } }
public TelecallerCustomerData GetTelecallerCustomer(string MobileNo, string GroupId, string connstr) { TelecallerCustomerData objteledata = new TelecallerCustomerData(); try { using (var context = new BOTSDBContext(connstr)) { objteledata = context.Database.SqlQuery <TelecallerCustomerData>("SP_BOTS_TelecallerData @pi_mobileNo", new SqlParameter("@pi_mobileNo", MobileNo)).FirstOrDefault <TelecallerCustomerData>(); } } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(objteledata); }
// GET: Tenant public ActionResult Index() { try { TblUser sessionUser = (TblUser)Session["UserSession"]; List <TblUser> lstAllUsers = new List <TblUser>(); lstAllUsers = ur.GetAllUsers(sessionUser.TenantId); return(View(lstAllUsers)); } catch (Exception ex) { newException.AddException(ex); return(View()); } }
public JsonResult GetOrdertoRavanaDaysData() { List <OrderVsRavanaDay> objOrderData = new List <OrderVsRavanaDay>(); try { var UserSession = (CustomerDetail)Session["ChitaleUser"]; objOrderData = pr.GetOrderVsRavanaDayData(UserSession.CustomerId); } catch (Exception ex) { newexception.AddException(ex, ""); } return(new JsonResult() { Data = objOrderData, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }); }
public List <CustomerListing> GetAllCustomer() { List <CustomerListing> objGroupList = new List <CustomerListing>(); try { List <tblGroupDetail> objGroupDetails = new List <tblGroupDetail>(); using (var context = new CommonDBContext()) { objGroupDetails = context.tblGroupDetails.Where(x => x.IsActive.Value == true && x.IsLive == true).ToList(); if (objGroupDetails != null) { foreach (var item in objGroupDetails) { CustomerListing objGroup = new CustomerListing(); objGroup.GroupId = item.GroupId; objGroup.Product = item.ProductType; objGroup.RetailName = item.RetailName; objGroup.StartedOn = item.WentLiveDate; objGroup.CustomerType = item.CustomerType; objGroup.OutletCount = item.OutletCount; var RetailCategoryName = context.tblCategories.Where(x => x.CategoryId == item.RetailCategory).Select(y => y.CategoryName).FirstOrDefault(); objGroup.RetailCategory = RetailCategoryName; var CityName = context.tblCities.Where(x => x.CityId == item.City).Select(y => y.CityName).FirstOrDefault(); objGroup.City = CityName; var SourcedByName = context.tblSourcedBies.Where(x => x.SourcedbyId == item.SourcedBy).Select(y => y.SourcedbyName).FirstOrDefault(); objGroup.SourcedBy = SourcedByName; var RMTeamName = context.tblRMAssigneds.Where(x => x.RMAssignedId == item.RMAssigned).Select(y => y.RMAssignedName).FirstOrDefault(); objGroup.RMTeam = RMTeamName; objGroup.BillingProductName = context.BOTS_TblBillingPartnerProduct.Where(x => x.BillingPartnerProductId == item.BillingProduct).Select(y => y.BillingPartnerProductName).FirstOrDefault(); objGroupList.Add(objGroup); } } } } catch (Exception ex) { newexception.AddException(ex, ""); } return(objGroupList); }
public ActionResult AddForum(tblForum objForum) { try { if (ModelState.IsValid) { var id = 0; TblUser sessionUser = (TblUser)Session["UserSession"]; objForum.CreatedBy = sessionUser.UserId; objForum.TenantId = sessionUser.TenantId; if (objForum.ForumType == 2) { objForum.IsBrodcast = false; } if (objForum.ForumId == 0) { id = fr.AddForum(objForum); } else { id = fr.EditForum(objForum); } if (id > 0) { TempData["Message"] = "1"; } else { TempData["Message"] = "2"; } //return View("objForum"); } return(View("AddForum", objForum)); } catch (Exception ex) { TempData["Message"] = "2"; newException.AddException(ex); return(View("AddForum", objForum)); } }
public ExecutiveSummary GetDashboardData(string GroupId, string connstr, string LoginId) { ExecutiveSummary dataDashboard = new ExecutiveSummary(); try { using (var context = new BOTSDBContext(connstr)) { //dataDashboard = context.Database.SqlQuery<ExecutiveSummary>("sp_Dashboard @pi_GroupId, @pi_Date", new SqlParameter("@pi_GroupId", GroupId), new SqlParameter("@pi_Date", DateTime.Now.ToShortDateString())).FirstOrDefault<ExecutiveSummary>(); dataDashboard = context.Database.SqlQuery <ExecutiveSummary>("sp_BOTS_LoyaltyPerfromance @pi_GroupId, @pi_Date,@pi_LoginId,@pi_Month,@pi_Year,@pi_OutletId", new SqlParameter("@pi_GroupId", GroupId), new SqlParameter("@pi_Date", DateTime.Now.ToShortDateString()), new SqlParameter("@pi_LoginId", LoginId), new SqlParameter("@pi_Month", ""), new SqlParameter("@pi_Year", ""), new SqlParameter("@pi_OutletId", "")).FirstOrDefault <ExecutiveSummary>(); dataDashboard.lstOutletDetails = context.Database.SqlQuery <OutletDetails>("sp_OutletDashboard @pi_GroupId, @pi_Date", new SqlParameter("@pi_GroupId", GroupId), new SqlParameter("@pi_Date", DateTime.Now.ToString("yyyy-MM-dd"))).ToList <OutletDetails>(); } } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(dataDashboard); }
public bool LeadTransfer(int[] LeadId, string SaleManagerId, string addedby) { bool result = false; try { SALES_tblLeads objsaleslead = new SALES_tblLeads(); SALES_tblLeadTracking objsalesleadtracking = new SALES_tblLeadTracking(); // string connStr = objCustRepo.GetCustomerConnString(GroupId); using (var contextNew = new CommonDBContext()) { foreach (int leadid in LeadId) { if (leadid != 0) { objsaleslead = contextNew.SALES_tblLeads.Where(x => x.LeadId == leadid).FirstOrDefault(); objsaleslead.AssignedLead = SaleManagerId; objsaleslead.UpdatedDate = DateTime.Now; contextNew.SALES_tblLeads.AddOrUpdate(objsaleslead); contextNew.SaveChanges(); objsalesleadtracking = contextNew.SALES_tblLeadTracking.Where(x => x.LeadId == leadid).FirstOrDefault(); if (objsalesleadtracking != null) { objsalesleadtracking.AssignedLead = SaleManagerId; objsalesleadtracking.AddedBy = addedby; objsalesleadtracking.AddedDate = DateTime.Now; contextNew.SALES_tblLeadTracking.AddOrUpdate(objsalesleadtracking); contextNew.SaveChanges(); } result = true; } } //} } } catch (Exception ex) { newexception.AddException(ex, "LeadTransfer"); } return(result); }
public JsonResult GetMemberSegmentResult(string GroupId, string OutletId) { List <object> lstData = new List <object>(); List <long> dataList = new List <long>(); DashboardMemberSegment dataMemberSegment = new DashboardMemberSegment(); try { List <string> lstDates = new List <string>(); string connectionString = CR.GetCustomerConnString(GroupId); dataMemberSegment = DR.GetDashboardMemberSegmentData(GroupId, OutletId, connectionString); } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(new JsonResult() { Data = dataMemberSegment, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }); }
public List <tblTemplateAssign> GetEmailTemplateAssigns(int TenantId) { try { db.parameters.Clear(); db.AddParameter("@tenantId", SqlDbType.Int, TenantId); DataSet ds = db.FillData("sp_GetEmailTemplate"); List <tblTemplateAssign> Emailtemplate = ds.Tables[0].AsEnumerable().Select(dr => new tblTemplateAssign { TenantId = Convert.ToInt32(dr["TenantId"]), TemplateId = Convert.ToInt32(dr["TemplateId"]), EmailSubject = Convert.ToString(dr["EmailSubject"]), EmailBody = Convert.ToString(dr["EmailBody"]), DateCreated = Convert.ToDateTime(dr["DateCreated"]) }).ToList(); return(Emailtemplate); } catch (Exception ex) { newException.AddException(ex); throw ex; } }
public List <DiscussionDetails> GetDiscussions(string GroupId) { List <DiscussionDetails> objData = new List <DiscussionDetails>(); try { using (var context = new CommonDBContext()) { //objData = context.BOTS_TblDiscussion.Where(x => x.GroupId == GroupId).ToList(); objData = (from c in context.BOTS_TblDiscussion join ct in context.BOTS_TblCallTypes on c.CallType equals ct.Id join cld in context.CustomerLoginDetails on c.AddedBy equals cld.LoginId where c.GroupId == GroupId select new DiscussionDetails { Id = c.Id, AddedDate = c.AddedDate, SpokenTo = c.SpokenTo, ContactNo = c.ContactNo, CallType = ct.CallType, CustomerType = c.CustomerType, FollowupDate = c.FollowupDate, CallMode = c.CallMode, Description = c.Description, ActionItems = c.ActionItems, AddedBy = cld.UserName, Status = c.Status, }).OrderByDescending(x => x.AddedDate).ToList(); } } catch (Exception ex) { newexception.AddException(ex, GroupId); } return(objData); }
// GET: CustomerManagement public ActionResult Index() { CustomerDashboardViewModel customerDashboardViewModel = new CustomerDashboardViewModel(); try { var userDetails = (CustomerLoginDetail)Session["UserSession"]; userDetails.CustomerName = ""; customerDashboardViewModel.onBoardingListings = OBR.GetOnBoardingListings(userDetails); customerDashboardViewModel.customerListings = CR.GetAllCustomer(); } catch (Exception ex) { newexception.AddException(ex, ""); } return(View(customerDashboardViewModel)); }
public string GetEncodePassword(string password) { try { string encodePassword = string.Empty; MD5 md5 = new MD5CryptoServiceProvider(); UTF8Encoding encoder = new UTF8Encoding(); Byte[] originalBytes = encoder.GetBytes(password); Byte[] encodedBytes = md5.ComputeHash(originalBytes); password = BitConverter.ToString(encodedBytes).Replace("-", ""); encodePassword = password.ToLower(); return(encodePassword); } catch (Exception ex) { newException.AddException(ex); return(null); } }
// GET: Curriculum public ActionResult Index() { List <tblCurriculum> lstCurriculum = new List <tblCurriculum>(); try { TblUser sessionUser = (TblUser)Session["UserSession"]; lstCurriculum = cc.GetCurriculumAll(sessionUser.TenantId); } catch (Exception ex) { newException.AddException(ex); } return(View(lstCurriculum)); }
// GET: Courses public ActionResult Index() { List <tblCourse> listInActiveCourses = new List <tblCourse>(); try { TblUser sessionUser = (TblUser)Session["UserSession"]; listInActiveCourses = cc.GetAllCourses(sessionUser.TenantId); } catch (Exception ex) { newException.AddException(ex); } return(View("CourseList", listInActiveCourses)); }
public List <tblCurriculum> GetCurriculumAll(int TenantId) { try { db.parameters.Clear(); db.AddParameter("@tenantId", SqlDbType.Int, TenantId); DataSet ds = db.FillData("sp_CurriculumGet"); List <tblCurriculum> lstCurriculum = ds.Tables[0].AsEnumerable().Select(dr => new tblCurriculum { CurriculumId = Convert.ToInt32(dr["CurriculumId"]), CurriculumTitle = Convert.ToString(dr["CurriculumTitle"]), CreatedDate = Convert.ToDateTime(dr["CreatedDate"]), CreatedBy = Convert.ToInt32(dr["CreatedBy"]), TenantId = Convert.ToInt32(dr["TenantId"]), }).ToList(); return(lstCurriculum); } catch (Exception ex) { newException.AddException(ex); throw ex; } }
public void SendMessage(string MobileNo, string Sender, string MobileMessage, string Url, string UserName, string Password) { try { MobileMessage = HttpUtility.UrlEncode(MobileMessage); string type1 = "TEXT"; StringBuilder sbposdata1 = new StringBuilder(); sbposdata1.AppendFormat("username={0}", UserName); sbposdata1.AppendFormat("&password={0}", Password); sbposdata1.AppendFormat("&to={0}", MobileNo); sbposdata1.AppendFormat("&from={0}", Sender); sbposdata1.AppendFormat("&text={0}", MobileMessage); sbposdata1.AppendFormat("&dlr-mask={0}", "19"); sbposdata1.AppendFormat("&dlr-url"); ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | (SecurityProtocolType)3072; ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; HttpWebRequest httpWReq1 = (HttpWebRequest)WebRequest.Create(Url); UTF8Encoding encoding1 = new UTF8Encoding(); byte[] data1 = encoding1.GetBytes(sbposdata1.ToString()); httpWReq1.Method = "POST"; httpWReq1.ContentType = "application/x-www-form-urlencoded"; httpWReq1.ContentLength = data1.Length; using (Stream stream1 = httpWReq1.GetRequestStream()) { stream1.Write(data1, 0, data1.Length); } HttpWebResponse response1 = (HttpWebResponse)httpWReq1.GetResponse(); StreamReader reader1 = new StreamReader(response1.GetResponseStream()); string responseString1 = reader1.ReadToEnd(); reader1.Close(); response1.Close(); } catch (Exception ex) { newexception.AddException(ex, "feedbacksmssend"); } }
public ActionResult Index() { try { var model = (TblUser)Session["UserSession"]; if (model.RoleId == 1) { return(View()); } if (model.RoleId == 2) { AdminHomeViewModel adminHomeViewModel = new AdminHomeViewModel(); adminHomeViewModel.lstActivities = hm.GetAllAdminActivities(model.TenantId); adminHomeViewModel.allCounts = hm.GetAllAdminHomeCounts(model.TenantId); return(View("AdminHome", adminHomeViewModel)); } if (model.RoleId == 3) { HomeViewModel homeViewModel = new HomeViewModel(); homeViewModel.lstActivities = hm.GetAllLearnerActivities(model.TenantId, model.UserId, "Total"); homeViewModel.TotalCount = homeViewModel.lstActivities.Count; homeViewModel.CompletedCount = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "Completed"); homeViewModel.InProgressCount = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "InProgress"); homeViewModel.NotStartedCount = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "Not Started"); var forum = fm.GetForumByForumType(model.TenantId); if (forum != null && forum.Count > 0) { homeViewModel.announcement = forum[0]; } return(View("LearnerHome", homeViewModel)); } } catch (Exception ex) { newException.AddException(ex); } return(RedirectToAction("Index", "Login")); }