public void OnPointerExit(PointerEventData pointerEventData) { RoleDesc.GetComponent <RoleDescScript>().Clear(); }
public void OnPointerEnter(PointerEventData pointerEventData) { RoleDesc.GetComponent <RoleDescScript>().CharacterInfo(Character); }
public void OnPointerEnter(PointerEventData pointerEventData) { RoleDesc.GetComponent <QuestDescScript>().RoleInfo(role); }
public int LoginDetail(Tbl_UserMaster Uobject) { //List<RoleDesc> sessionrole = new List<RoleDesc>(); int sessionrole = 0; con = Utility.Util.Connection("DBEntities"); string result = ""; string result2 = ""; string pageName = "Login"; try { #region CheckLogin SqlCommand cmd = new SqlCommand("SP_Login", con); con.Open(); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@userName", Uobject.UserName); cmd.Parameters.AddWithValue("@Password", Uobject.Password); cmd.Parameters.AddWithValue("@Msg", ""); result = cmd.ExecuteScalar().ToString(); string[] lines = result.Split('-'); int authvalue = lines[0].Contains("Login Successfull") ? 1 : 0; int id = Convert.ToInt16(lines[1]); #endregion #region insert into audit procedure result2 = AuditData.AduitFile.FillAudit(pageName, Uobject.UserName, authvalue); #endregion if (authvalue != 0) { getId = lines[1]; customerid = Convert.ToInt16(lines[2]); custType = lines[3]; getName = Uobject.UserName; sessionrole = Selectrole(id); return(sessionrole); } else { //List<RoleDesc> errorlog = new List<RoleDesc>(); RoleDesc rp = new RoleDesc(); rp.id = 001; getName = result; sessionrole = 0; //return errorlog; } } catch (Exception ex) { ex.Message.ToString(); return(sessionrole); } finally { con.Close(); } return(sessionrole); }
public ActionResult Login(Tbl_UserMaster Uobject) { if (string.IsNullOrEmpty(Uobject.UserName)) { ModelState.AddModelError("UserName", "User Name Cannot be blank"); } if (string.IsNullOrEmpty(Uobject.Password)) { ModelState.AddModelError("Password", "Password Came cannot be blank"); } if (ModelState.IsValid) //checking model is valid or not { RoleDesc rp = new RoleDesc(); DataAccessLayer objDB = new DataAccessLayer(); // rp.Showall = objDB.LoginDetail(Uobject); int roleids = objDB.LoginDetail(Uobject); if (roleids == 0) { TempData["Message"] = objDB.getName; return(View("AppliedPage")); } string Uid = objDB.getId; string Uname = objDB.getName; Session["U_ID"] = Uid; Session["U_Name"] = Uname; Session["Cust_ID"] = objDB.customerid; Session["CustType"] = objDB.custType; #region List version //rp.Showall //if (rp.Showall != null && rp.Showall.Count > 0) //{ // for (int i = 0; i < rp.Showall.Count; i++) // { // if (rp.Showall[i].id != 0) // { // a = rp.Showall[i].id; // UserRoleList.Add(a); // } // else // { // return RedirectToAction("AppliedPage"); // } // } //} #endregion string strTmp = ""; //Session["SortedList1"] = UserRoleList; Session["SortedList1"] = roleids; if (roleids == 2 || roleids == 4 || roleids == 8) { strTmp = "view"; TempData["ErrorMessage"] = "Applied"; TempData["Roleid"] = roleids.ToString(); } else if (roleids == 1) { strTmp = "Max"; TempData["ErrorMessage"] = "Applied"; TempData["Roleid"] = roleids.ToString(); } else if (roleids == 3 || roleids == 6) { strTmp = "Admin"; TempData["ErrorMessage"] = "Applied"; TempData["Roleid"] = roleids.ToString(); } TempData["Viewstr"] = strTmp; Session["ViewData"] = strTmp; return(RedirectToAction("Index")); } return(View(Uobject)); }