Example #1
0
        public async Task <string> GetAdminSettings()
        {
            List <SQLParam> sQLParam   = new List <SQLParam>();
            SQLGetAsync     sqlhandler = new SQLGetAsync();

            try
            {
                return(await sqlhandler.ExecuteAsScalarAsync <string>("[usp_AdminSetting_GetSettings]", sQLParam));
            }
            catch
            {
                throw;
            }
        }
Example #2
0
        internal async Task <string> GetFormByPostId(int postId)
        {
            List <SQLParam> sQLParam = new List <SQLParam>();

            sQLParam.Add(new SQLParam("@PostId", postId));
            try
            {
                SQLGetAsync handler = new SQLGetAsync();
                return(await handler.ExecuteAsScalarAsync <string>("[usp_WebBuilder_DynamicPostType_GetFormByPostId]", sQLParam));
            }
            catch
            {
                throw;
            }
        }
Example #3
0
        internal async Task <bool> CheckHasDetailTemplates(int postId)
        {
            List <SQLParam> sQLParam = new List <SQLParam>();

            sQLParam.Add(new SQLParam("@PostId", postId));
            SQLGetAsync handler = new SQLGetAsync();

            try
            {
                return(await handler.ExecuteAsScalarAsync <bool>("[usp_WebBuilder_DynamicPostType_CheckHasDetailTemplate]", sQLParam));
            }
            catch
            {
                throw;
            }
        }
Example #4
0
        public async Task <string> GetRoleRedirectURL(string roleNames, int siteID)
        {
            List <SQLParam> param = new List <SQLParam>
            {
                new SQLParam("@RoleIDs", roleNames),
                new SQLParam("@SiteID", siteID)
            };

            try
            {
                SQLGetAsync sqlhandler = new SQLGetAsync();
                return(await sqlhandler.ExecuteAsScalarAsync <string>("[dbo].[usp_Admin_RoleUrlMap_GetByRole]", param));
            }
            catch
            {
                throw;
            }
        }
Example #5
0
        public async Task <int> SaveUserArea(UserAreaModel userArea)
        {
            int result = -1;

            List <SQLParam> sQLParam = new List <SQLParam>();

            sQLParam.Add(new SQLParam("@UserAreaID", userArea.UserAreaID));
            sQLParam.Add(new SQLParam("@UserArea", userArea.UserArea));

            try
            {
                SQLGetAsync objSQL = new SQLGetAsync();
                result = await objSQL.ExecuteAsScalarAsync <int>("[dbo].[usp_Asset_UserArea_Save]", sQLParam);
            }
            catch (Exception)
            {
                throw;
            }

            return(result);
        }
Example #6
0
        public async Task <int> SaveApplication(ApplicationNameInfo app)
        {
            int result = -1;

            List <SQLParam> sQLParam = new List <SQLParam>();

            sQLParam.Add(new SQLParam("@ApplicationID", app.ApplicationID));
            sQLParam.Add(new SQLParam("@ApplicationName", app.ApplicationName));


            try
            {
                SQLGetAsync objSQL = new SQLGetAsync();
                result = await objSQL.ExecuteAsScalarAsync <int>("[dbo].[usp_Application_Save]", sQLParam);
            }
            catch
            {
                throw;
            }

            return(result);
        }