public ResponseResult getUserInfo(int UserId) { try { User StudentObject = DataService.getUserInfo(UserId); //Section UserSection = DataService.getUserSection(StudentObject.UserId); return(ResponseResult.GetSuccessObject(new { StudentInfo = StudentObject })); //return (new //{ // data = new // { // StudentInfo = StudentObject // }, // success = true, // error = "" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public IActionResult Index() { var userInfo = string.Format("api/GetUserById"); var userInforResult = CustomUtility.GetSingleRecord <Users>(userInfo); return(View(userInforResult)); }
public ResponseResult GetActivePermissions() { try { var List = DataService.GetAllPermissions().Where(p => p.IsActive == true).ToList(); return(ResponseResult.GetSuccessObject(new { PermissionList = List })); //return (new //{ // data = new // { // PermissionList = List // }, // success = true, // error = "" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult getUsers() { try { var List = DataService.GetAllUsers(); return(ResponseResult.GetSuccessObject(new { UserList = List })); //return (new //{ // data = new // { // UserList = List // }, // success = true, // error = "" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult SearchUsers(UserSearchParam pSearchParam) { try { var result = DataService.SearchUsers(pSearchParam); return(ResponseResult.GetSuccessObject(new { Count = result.ResultCount, UserList = result.Result })); //return (new //{ // data = new // { // Count = result.ResultCount, // UserList = result.Result // }, // success = true, // error = "" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult SaveUserRoleMapping(int pUserID, List <int> pRoles) { try { var List = DataService.SaveUserRoleMapping(pUserID, pRoles); return(ResponseResult.GetSuccessObject(new { Roles = List }, "Mappings are saved")); //return (new //{ // data = new // { // Roles = List // }, // success = true, // error = "Mappings are saved" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult SaveUsers(User u) { try { String msg; u.Password = PasswordSaltedHashingUtility.HashPassword("123"); var result = DataService.SaveUsers(u, DateTime.UtcNow, SessionManager.CurrentUser.UserId); if (result > 0) { if (u.UserId > 0) { msg = "User Updated Successfully"; } else { msg = "User Added Successfully"; } return(ResponseResult.GetSuccessObject(new { UserId = result, }, msg)); } else { return(ResponseResult.GetErrorObject()); } } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult EnableDisableRole(Roles pRoleObj) { String msg = " "; try { bool rowdeleted = DataService.EnableDisableRole(pRoleObj.Id, pRoleObj.IsActive, DateTime.UtcNow, SessionManager.CurrentUser.UserId); if (rowdeleted == true) { var param = (pRoleObj.IsActive == false ? "disabled" : "enabled"); msg = String.Format("Role is {0} successfully", param); } else { msg = " "; } return(ResponseResult.GetSuccessObject(new { RoleId = pRoleObj.Id }, msg)); //return (new //{ // success = true, // error = msg //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult GetRolesByUserID(int pUserID) { try { var List = DataService.GetRolesByUserID(pUserID); return(ResponseResult.GetSuccessObject(new { Roles = List })); //return (new //{ // data = new // { // Roles = List // }, // success = true, // error = "" //}); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult IdeaExist(Project proj) { String msg; try { var result = DataService.CheckIdeaExist(proj.UserId); if (result > 0) { msg = "you have already initiated a idea!"; return ResponseResult.GetSuccessObject(new { ProjectId = result, }, msg); } else { return ResponseResult.GetErrorObject(); } } catch (Exception ex) { CustomUtility.HandleException(ex); return ResponseResult.GetErrorObject(); } }
public ResponseResult SearchLoginHistory(LoginHistorySearchParam pSearchParam) { try { if (pSearchParam.SDate <= DateTime.MinValue) { pSearchParam.SDate = new DateTime(1900, 1, 1); } if (pSearchParam.EDate <= DateTime.MinValue) { pSearchParam.EDate = DateTime.MaxValue; } var result = DataService.SearchLoginHistory(pSearchParam); return(ResponseResult.GetSuccessObject(new { Count = result.ResultCount, LoginHistoryList = result.Result })); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
//public Object SignOut(Boolean pManualEclockLogout) //{ // try // { // SessionManager.CurrentUser = null; // SessionManager.AbandonSession(); // HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); // HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddSeconds(-1)); // HttpContext.Current.Response.Cache.SetNoStore(); // if (HttpContext.Current.Request.Cookies["breadcrumbs"] != null) // { // HttpCookie myCookie = new HttpCookie("breadcrumbs"); // myCookie.Expires = DateTime.UtcNow.AddDays(-1d); // HttpContext.Current.Response.Cookies.Add(myCookie); // } // return ResponseResult.GetSuccessObject(); // //var result = new // //{ // // success = true, // // error = "" // //}; // //return (result); // } // catch (Exception ex) // { // CustomUtility.HandleException(ex); // return ResponseResult.GetErrorObject("Email not correct"); // } //} public ResponseResult ResetPassword(PasswordEntity pass) { if (PUCIT.AIMRL.SFP.UI.Common.SessionManager.LogsInAsOtherUser == true) { return(ResponseResult.GetErrorObject("You Are Not Allowed")); } try { var password = pass.NewPassword; if (GlobalDataManager.IgnoreHashing == false) { password = PasswordSaltedHashingUtility.HashPassword(pass.NewPassword); } var flag = DataService.UpdatePassword(pass.Token, "", password, 0, DateTime.UtcNow, false); if (flag) { return(ResponseResult.GetSuccessObject(null, "Password is reset")); } else { return(ResponseResult.GetErrorObject("Reset is failed")); } } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult updateUserProfile(EditUser u) { String msg; try { int isUpdated = DataService.updateUserProfile(u); if (isUpdated == 1) { msg = "User Updated Successfully"; return(ResponseResult.GetSuccessObject(new { IsUpdated = isUpdated }, msg)); } else { msg = "User didn't updated successfully"; return(ResponseResult.GetErrorObject(msg)); } } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject("User didn't updated successfully")); } }
static void Init() { // Get existing open window or if none, make a new one: CustomUtility window = (CustomUtility)EditorWindow.GetWindow(typeof(CustomUtility)); window.Show(); }
public ActionResult EditUser(int Id) { var userInfo = string.Format("api/GetUserById?Id=" + Id); var userInfoResult = CustomUtility.GetSingleRecord <Users>(userInfo); var roleInfo = string.Format("api/GetRoleById"); var roleInfoResult = CustomUtility.GetSingleRecord <Roles>(roleInfo); ViewBag.RoleList = new SelectList(roleInfoResult, "RoleId", "RoleName").Items; return(PartialView("UserEdit", userInfoResult[0])); }
public ActionResult Addrecord() { var roleInfo = string.Format("api/GetRoleById"); var roleInfoResult = CustomUtility.GetSingleRecord <Roles>(roleInfo); ViewBag.Message = "Registration"; ViewBag.RoleList = new SelectList(roleInfoResult, "RoleId", "RoleName").Items; return(PartialView("UserRegistration")); }
public ActionResult EditRole(int Id) { var menuInfo = string.Format("api/GetMenuModelForRoleMaster?roleId=" + Id); List <MenuModelForRoleMaster> menuInforResult = CustomUtility.GetSingleRecord <MenuModelForRoleMaster>(menuInfo); HttpContext.Session.SetObjectAsJson("RoleMenuMaster", menuInforResult); var RoleResult = CustomUtility.GetSingleRecord <Roles>(string.Format("api/GetRoleById?roleId=" + Id)); return(PartialView("RoleEdit", RoleResult[0])); }
public PartialViewResult RefreshSearchResult(int groupId, int selectedTemplateId, DateTime FromDate, DateTime ToDate) { var From_Date = FromDate.ToString("MMM dd yyyy"); var To_Date = ToDate.ToString("MMM dd yyyy"); var ReconsileReportResult = CustomUtility.GetSingleRecord <NonReconsileData>(string.Format("api/GetNonReconsileData?groupTemplateId=" + groupId + "&selectedTemplateId=" + selectedTemplateId + "&fromDate=" + From_Date + "&toDate=" + To_Date + "")); ViewModelNonReconsile mymodel = new ViewModelNonReconsile(); mymodel.NonReconsileData = ReconsileReportResult; return(PartialView("_ManualReconsile", mymodel)); }
void Start() { // initializing ground game object GameObject groundGameObject = Instantiate(GroundObjectPrefab, new Vector3(groundObjectSize.x / 2, groundObjectHeight, groundObjectSize.z / 2), Quaternion.identity, this.transform); CustomUtility.ChangeLocalScale(groundGameObject, groundObjectSize); groundGameObject.layer = MasterManager.Instance.GameSettings.GroundLayer; // }
// create audio object private void CreateAudioObject() { var AO = CustomUtility.CreateDontDestroyObject <AudioObject>(); AO.del_OnFinishedPlay = cbAudioFinished; AO.del_OnAudioPlay = cbAudioPlay; AO.transform.parent = transform; AO.gameObject.SetActive(false); cachedAuidoList.Add(AO); audioPool.Push(AO); }
public JsonResult EditrecordAPICall(List <SubMenuRoleId> selectedMenuId) { bool isSuccessStatusCode = false; var templateGroupResult = CustomUtility.PostDataOfType("api/UpdateRole", selectedMenuId, out isSuccessStatusCode); if (!isSuccessStatusCode) { // throw new CustomException(responseString); } return(Json("Success")); }
public ActionResult EditTemplateGroup(TemplateGroup templateGroupDetail) { bool isSuccessStatusCode = false; var templateGroupResult = CustomUtility.PostDataOfType("api/UpdateTemplateGroup", templateGroupDetail, out isSuccessStatusCode); if (!isSuccessStatusCode) { // throw new CustomException(responseString); } return(RedirectToAction("Index", "TemplateGroup")); }
public JsonResult EditTemplateApiCall(ReconsileTemplate templateDetail) { bool isSuccessStatusCode = false; var templateInfoResult = CustomUtility.PostDataOfType("api/UpdateTemplate", templateDetail, out isSuccessStatusCode); if (!isSuccessStatusCode) { Response.StatusCode = (int)HttpStatusCode.InternalServerError; return(Json(templateInfoResult.ToString())); } return(Json("Success")); }
public IActionResult Index() { var formattedDate = DateTime.Today.ToString("dd MMM yyyy"); var ReconsileReportResult = CustomUtility.GetSingleRecord <NonReconsileData>(string.Format("api/GetNonReconsileData?groupTemplateId=0&fromDate=" + formattedDate + "&toDate=" + formattedDate + "")); var TemplateGroupResult = CustomUtility.GetSingleRecord <TemplateGroup>(string.Format("api/GetTemplateGroupValue?OnlyActive=1")); // ViewBag.TemplateGroupList = new SelectList(TemplateGroupResult, "templateGroupId", "templateGroupName").Items; ViewModelNonReconsile mymodel = new ViewModelNonReconsile(); mymodel.NonReconsileData = ReconsileReportResult; mymodel.TemplateGroup = TemplateGroupResult; return(View(mymodel)); }
public ActionResult EditUser(Users userDetail) { bool isSuccessStatusCode = false; var roleInfoResult = CustomUtility.PostDataOfType("api/UpdateUser", userDetail, out isSuccessStatusCode); if (!isSuccessStatusCode) { // throw new CustomException(responseString); } return(RedirectToAction("Index", "Users")); }
public ActionResult EditFileExtension(FileExtension fileExtensionDetail) { bool isSuccessStatusCode = false; var fileExtensionResult = CustomUtility.PostDataOfType("api/UpdateFileExtension", fileExtensionDetail, out isSuccessStatusCode); if (!isSuccessStatusCode) { // throw new CustomException(responseString); } return(RedirectToAction("Index", "FileExtension")); }
public ActionResult EditTemplate(int Id) { var TemplateResult = CustomUtility.GetSingleRecord <ReconsileTemplate>(string.Format("api/GetTemplateById?Id=" + Id)); var ExtensionInfoResult = CustomUtility.GetSingleRecord <FileExtension>(string.Format("api/GetFileExtension")); var DelimeterValue = CustomUtility.GetSingleRecord <Delimiter>(string.Format("api/GetDelimeterValue")); var TemplateGroupValue = CustomUtility.GetSingleRecord <TemplateGroup>(string.Format("api/GetTemplateGroupValue")); ViewBag.ExtensionList = new SelectList(ExtensionInfoResult, "FileExtensionId", "FileextensionName").Items; ViewBag.DelimeterValueList = new SelectList(DelimeterValue, "DelimiterId", "DelimiterValue").Items; ViewBag.TemplateGroupValue = new SelectList(TemplateGroupValue, "TemplateGroupId", "TemplateGroupName").Items; return(PartialView("TemplateEdit", TemplateResult[0])); }
public IActionResult Index() { var menuInfo = string.Format("api/GetMenuModelForRoleMaster?roleId=0"); List <MenuModelForRoleMaster> menuInforResult = CustomUtility.GetSingleRecord <MenuModelForRoleMaster>(menuInfo); HttpContext.Session.SetObjectAsJson("RoleMenuMaster", menuInforResult); var RolesResult = CustomUtility.GetSingleRecord <Roles>(string.Format("api/GetRoleById")); ViewModelRoleMaster mymodel = new ViewModelRoleMaster(); mymodel.Roles = RolesResult; //mymodel.MenuModel = TemplateGroupResult; return(View(mymodel)); }
public ResponseResult IdeaExist(Project proj) { try { Util.CustomUtility.LogData("Going to check weather user have already added project idea or not" + proj.UserId); return(Repository.IdeaExist(proj)); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); } }
public ResponseResult updateUserProfilePic(string fileName) { try { return(DataService.updateUserProfilePic(fileName)); } catch (Exception ex) { CustomUtility.HandleException(ex); return(ResponseResult.GetErrorObject()); //return ResponseResult.GetErrorObject("Some error has occured in While showing User Projects Wall."); } }