public ActionResult DoAuthentication(string custid, string userName, string returnUrl) { if (IsAuthenticated) { Session.Clear(); FormsAuthentication.SetAuthCookie(userName, false); string userid = SigninManager.GetUserIdByUserName(userName); Manageabcmmxyz manageabc = new Manageabcmmxyz(); abcmmxyz abc1 = manageabc.getabcmmxyz(CommonMethod.Encrypt(custid.ToUpper())); ProjectSession.serialkey = CommonMethod.Decrypt(abc1.ijyskqop); ProjectSession.registerowner = CommonMethod.Decrypt(abc1.padsrownr); ProjectSession.expirydate = CommonMethod.Decrypt(abc1.sdgrexdtsgrg); ProjectSession.nocompactive = CommonMethod.Decrypt(abc1.ttdssdactubt); ProjectSession.UserId = userid; ProjectSession.UserName = userName; ProjectSession.distcontactno = "+91-8000838147"; ProjectSession.distemailid = "support@infinitybitsolution"; ProjectSession.custid = custid; //Check Registration Validation DateTime expdate_1; DateTime curdate_1; //expdate_1 = Convert.ToDateTime(Convert.ToDateTime(ProjectSession.expirydate).ToString("dd/MM/yyyy")); //curdate_1 = Convert.ToDateTime(DateTime.Now.ToString("dd/MM/yyyy")); //if (expdate_1 < curdate_1) //{ // UserAuthentication model1 = new UserAuthentication(); // ViewBag.Error = "License is expired, Kindly contact your administrator."; // return View(model1); // //return RedirectToAction("Login"); //} if (userid == "0") { ProjectSession.addrights = true; ProjectSession.editrights = true; ProjectSession.deleterights = true; ProjectSession.uploadrights = true; ProjectSession.downloadrights = true; ProjectSession.sendmailrights = true; } if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/") && !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\")) { return(Redirect(returnUrl)); } return(RedirectToAction("AdminDashboard", "Home")); } return(RedirectToAction("Login")); }
public abcmmxyzmodel(abcmmxyz objabc) : this() { ijyskqop = objabc.ijyskqop; padsrownr = objabc.padsrownr; sdgrexdtsgrg = objabc.sdgrexdtsgrg; rrggregdtgttd = objabc.rrggregdtgttd; ttdssdactubt = objabc.ttdssdactubt; uvadfdnusetbt = objabc.uvadfdnusetbt; vtggspnosg = objabc.vtggspnosg; hydfgshdnobb = objabc.hydfgshdnobb; fgewervrfkeysasf = objabc.fgewervrfkeysasf; agdfgcidrttr = objabc.agdfgcidrttr; id = objabc.id; }