public static JsonResults GetPositions() { JsonResults plist = new JsonResults(); LoginUser currentUser; try { if (!GetUserSession(out currentUser)) { plist.ErrorCode = 1001; plist.ErrorMessage = ""; return(plist); } AdminManagerSP adminObj = new AdminManagerSP(); if (!adminObj.GetPickLists(currentUser.CompanyID, currentUser.UserId, "EmployeePosition", out plist)) { plist.ErrorCode = adminObj.GetLastErrorCode(); plist.ErrorMessage = adminObj.GetLastError(); } } catch (Exception ex) { plist.ErrorCode = -4; plist.ErrorMessage = "Unknown Error Occured"; Utils.Write(ex); } return(plist); }
public static JsonResults GetItemGroups() { JsonResults returnObj = new JsonResults(); LoginUser currentUser; try { if (!GetUserSession(out currentUser)) { returnObj.ErrorCode = 1001; returnObj.ErrorMessage = ""; } AdminManagerSP customerObj = new AdminManagerSP(); if (customerObj.GetPickLists(currentUser.CompanyID, currentUser.UserId, "ItemMasterGroup", out returnObj)) { returnObj.ErrorCode = 0; returnObj.ErrorMessage = ""; } else { returnObj.ErrorCode = customerObj.GetLastErrorCode(); returnObj.ErrorMessage = customerObj.GetLastError(); } } catch (Exception ex) { Utils.Write(ex); } return(returnObj); }