public object ValidateUser(JsonMember.UserDetails obj) { dt = objTaj.LoginMaster(obj); string Det = JsonConvert.SerializeObject(dt, Formatting.Indented); return(Det.Replace("\r", "").Replace("\n", "")); }
public object UpdatePermission(JsonMember.UserDetails obj) { string Det = JsonConvert.SerializeObject(objTaj.MenuPermission(obj), Formatting.Indented); return(Det.Replace("\r", "").Replace("\n", "")); }
public object GetHeaderDetails(JsonMember.UserDetails obj) { string Det = JsonConvert.SerializeObject(objTaj.HeaderDetails(obj), Formatting.Indented); return(Det.Replace("\r", "").Replace("\n", "")); }
public object UpdatePersonalDetails() { bool flag = false; string Det; JsonMember.UserDetails obj = new JsonMember.UserDetails(); JsonMember.LoginReturn Lobj = new JsonMember.LoginReturn(); try { if (HttpContext.Current.Request.Files.Count > 0) { for (int i = 0; i < HttpContext.Current.Request.Files.Count; i++) { var hpf = HttpContext.Current.Request.Files[i]; if (hpf != null) { obj.LoginId = HttpContext.Current.Request.Form.Get("LoginId"); obj.EmailId = HttpContext.Current.Request.Form.Get("EmailId"); obj.FirstName = HttpContext.Current.Request.Form.Get("FirstName"); obj.LastName = HttpContext.Current.Request.Form.Get("LastName"); obj.MobileNo = HttpContext.Current.Request.Form.Get("MobileNo"); obj.UserId = Int64.Parse(HttpContext.Current.Request.Form.Get("UserId")); string rootPath = System.Web.Hosting.HostingEnvironment.MapPath("~/UserProfilePictures/"); string fileName = Path.GetFileName(hpf.FileName); fileName = obj.LoginId + ".png"; string fpath = rootPath + fileName; hpf.SaveAs(fpath); flag = true; obj.ProfilePicPath = "/UserProfilePictures/" + fileName; } else { Lobj = new JsonMember.LoginReturn() { flag = "false", Message = "Unable to process", EmailId = "", MobileNo = "", Name = "", UserId = "", FirstName = "", LastName = "", ProfilePicPath = "", }; } } } else { obj.LoginId = HttpContext.Current.Request.Form.Get("LoginId"); obj.EmailId = HttpContext.Current.Request.Form.Get("EmailId"); obj.FirstName = HttpContext.Current.Request.Form.Get("FirstName"); obj.LastName = HttpContext.Current.Request.Form.Get("LastName"); obj.MobileNo = HttpContext.Current.Request.Form.Get("MobileNo"); obj.UserId = Int64.Parse(HttpContext.Current.Request.Form.Get("UserId")); obj.ProfilePicPath = ""; flag = true; } } catch (Exception ex) { Lobj = new JsonMember.LoginReturn() { flag = "false", Message = ex.Message.ToString(), EmailId = "", MobileNo = "", Name = "", UserId = "", FirstName = "", LastName = "", ProfilePicPath = "", }; } if (flag) { Det = JsonConvert.SerializeObject(UserMaster.UpdatePersonalDetails(obj), Formatting.Indented); } else { Det = JsonConvert.SerializeObject(Lobj, Formatting.Indented); } return(Det.Replace("\r", "").Replace("\n", "")); }
public object GenerateUser(JsonMember.UserDetails obj) { string Det = JsonConvert.SerializeObject(UserMaster.GenerateUser(obj), Formatting.Indented); return(Det.Replace("\r", "").Replace("\n", "")); }
public string ChangePassword(JsonMember.UserDetails obj) { string Det = JsonConvert.SerializeObject(UserMaster.ChangePassword(obj), Formatting.Indented); return(Det.Replace("\r", "").Replace("\n", "")); }