示例#1
0
        public JsonResult GetModulesByProductID(int?ProductID)
        {
            try
            {
                List <HCM_Module> list_Hcm_Module_Obj = new List <HCM_Module>();
                ModifyUsersData   usersData_Obj       = new ModifyUsersData();
                list_Hcm_Module_Obj = usersData_Obj.GetModulesByProductID(ProductID);

                var jsonResult = Json(list_Hcm_Module_Obj, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        public JsonResult GetUsersList()
        {
            try
            {
                List <HCM_Users> user_list = new List <HCM_Users>();
                ModifyUsersData  user_Obj  = new ModifyUsersData();
                user_list = user_Obj.GetUsers();

                var jsonResult = Json(user_list, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        public JsonResult GetCountries(string RegionID)
        {
            try
            {
                List <HCM_Country> location_list = new List <HCM_Country>();
                ModifyUsersData    user_Obj      = new ModifyUsersData();
                location_list = user_Obj.GetCountriesBasedOnRegion(RegionID);

                var jsonResult = Json(location_list, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#4
0
        public JsonResult EditUserByID(string UserID)
        {
            try
            {
                List <HCM_UserModuleMapper> user_list = new List <HCM_UserModuleMapper>();
                ModifyUsersData             user_Obj  = new ModifyUsersData();
                user_list = user_Obj.EditUserById(UserID);

                var jsonResult = Json(user_list, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#5
0
        public JsonResult SendEmailToUser(string EmailTo, string FirstName, string LastName)
        {
            try
            {
                string          Msg;
                ModifyUsersData User_sendEmail = new ModifyUsersData();
                Msg = User_sendEmail.SendEmail(EmailTo, HttpUtility.UrlDecode(FirstName), HttpUtility.UrlDecode(LastName));

                var jsonResult = Json(Msg, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#6
0
        public JsonResult InsertAndUpdateUser(string UserDataArray)
        {
            try
            {
                string Msg;
                UserDataArray = HttpUtility.UrlDecode(UserDataArray);
                NameValueCollectionData nameValueCollectionData_Obj = new NameValueCollectionData();
                NameValueCollection     Usercollection_Obj          = nameValueCollectionData_Obj.GetQueryStringCollection(UserDataArray);
                ModifyUsersData         User_Create = new ModifyUsersData();
                Msg = User_Create.InsertAndUpdateUser(Usercollection_Obj);

                var jsonResult = Json(Msg, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }