private void GetBannerSetting() { SageBannerSettingInfo obj = GetSageBannerSettingList(GetPortalID, Int32.Parse(SageUserModuleID)); Auto_Slide = obj.Auto_Slide; Caption = obj.Caption; InfiniteLoop = obj.InfiniteLoop; NumericPager = obj.NumericPager; Pause_Time = obj.Pause_Time; RandomStart = obj.RandomStart; EnableControl = obj.EnableControl; Speed = obj.Speed; TransitionMode = obj.TransitionMode; BannerId = obj.BannerToUse; }
/// <summary> /// Connects to database and returns SageBannerSettingInfo object for given PortalID,UserModuleID and CultureCode. /// </summary> /// <param name="PortalID">PortalID</param> /// <param name="UserModuleID">UserModuleID</param> /// <param name="CultureCode">CultureCode</param> /// <returns> Object of SageBannerSettingInfo class.</returns> public SageBannerSettingInfo GetSageBannerSettingList(int PortalID, int UserModuleID, string CultureCode) { try { SageBannerSettingInfo Getsettin = new SageBannerSettingInfo(); List <KeyValuePair <string, object> > paramCol = new List <KeyValuePair <string, object> >(); paramCol.Add(new KeyValuePair <string, object>("@PortalID", PortalID)); paramCol.Add(new KeyValuePair <string, object>("@UserModuleID", UserModuleID)); paramCol.Add(new KeyValuePair <string, object>("@CultureCode", CultureCode)); SQLHandler sageSQL = new SQLHandler(); Getsettin = sageSQL.ExecuteAsObject <SageBannerSettingInfo>("[dbo].[usp_SageBannerGetBannerSetting]", paramCol); return(Getsettin); } catch (Exception ex) { throw ex; } }
public void GetSetting() { SageBannerSettingInfo obj = GetSageBannerSetting(GetPortalID, Int32.Parse(SageUserModuleID), GetCurrentCulture()); chkAutoSlide.Checked = obj.Auto_Slide; chkInfiniteLoop.Checked = obj.InfiniteLoop; chkNumeric.Checked = obj.NumericPager; txtPauseTime.Text = Convert.ToString(obj.Pause_Time); txtSpeed.Text = Convert.ToString(obj.Speed); ddlTransitionMode.SelectedValue = obj.TransitionMode; chkEnableControl.Checked = obj.EnableControl; if (obj.TransitionMode == "horizontal") { ddlTransitionMode.SelectedValue = "0"; } else { ddlTransitionMode.SelectedValue = "2"; } ddlBannerListToUse.SelectedValue = obj.BannerToUse; }
/// <summary> /// Obtain sagebanner setting list. /// </summary> /// <param name="PortalID">PortalID</param> /// <param name="UserModuleID">UserModuleID</param> /// <param name="CultureCode">CultureCode</param> /// <returns>SageBannerSettingInfo object.</returns> public SageBannerSettingInfo GetSageBannerSettingList(int PortalID, int UserModuleID, string CultureCode) { try { SageBannerSettingInfo objSageBannerSettingInfo = new SageBannerSettingInfo(); if (HttpRuntime.Cache["BannerSetting_" + CultureCode + "_" + UserModuleID.ToString()] != null) { objSageBannerSettingInfo = HttpRuntime.Cache["BannerSetting_" + CultureCode + "_" + UserModuleID.ToString()] as SageBannerSettingInfo; } else { SageBannerProvider objp = new SageBannerProvider(); objSageBannerSettingInfo = objp.GetSageBannerSettingList(PortalID, UserModuleID, CultureCode); HttpRuntime.Cache["BannerSetting_" + CultureCode + "_" + UserModuleID.ToString()] = objSageBannerSettingInfo; } return(objSageBannerSettingInfo); } catch (Exception ex) { throw ex; } }