Esempio n. 1
0
        public async Task <int> SaveAssetSettings(SaveAssetInfo asset)
        {
            int result = 1;

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

            sQLParam.Add(new SQLParam("@BundleAssetID", asset.AssetID));
            sQLParam.Add(new SQLParam("@Name", asset.Names));
            sQLParam.Add(new SQLParam("@AssetType", asset.AssetType));
            sQLParam.Add(new SQLParam("@Position", asset.Position));
            sQLParam.Add(new SQLParam("@FilePath", asset.FilePath));
            sQLParam.Add(new SQLParam("@IsExternal", asset.IsExternal));
            sQLParam.Add(new SQLParam("@ExcessMode", asset.ExcessMode));
            sQLParam.Add(new SQLParam("@Application", asset.Application));
            sQLParam.Add(new SQLParam("@UserAreaID", asset.UserAreaID));
            sQLParam.Add(new SQLParam("@Roles", asset.Roles));



            try
            {
                SQLExecuteNonQueryAsync objSQL = new SQLExecuteNonQueryAsync();
                await objSQL.ExecuteNonQueryAsync("[dbo].[usp_Asset_Save]", sQLParam);
            }
            catch
            {
                throw;
            }

            return(result);
        }
Esempio n. 2
0
        public async Task <SaveAssetInfo> GetAssetSettingByID(int bundleAssetID)
        {
            List <SQLParam> sQLParam = new List <SQLParam>();

            sQLParam.Add(new SQLParam("@BundleAssetID", bundleAssetID));

            SaveAssetInfo bundleAsset = new SaveAssetInfo();

            try
            {
                SQLGetAsync objSQL = new SQLGetAsync();
                bundleAsset = await objSQL.ExecuteAsObjectAsync <SaveAssetInfo>("[dbo].[usp_Asset_Settings_GetByID]", sQLParam);
            }
            catch
            {
                throw;
            }

            return(bundleAsset);
        }
Esempio n. 3
0
        public async Task <int> SaveAssetSettings(SaveAssetInfo asset)
        {
            AssetDataprovider assetDataprovider = new AssetDataprovider();

            return(await assetDataprovider.SaveAssetSettings(asset));
        }