private void LoadSettingtoControl() { try { ddlSubscriptionType.Items.Clear(); BindSubscriptionTypeList(); List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >(); ParaMeterCollection.Add(new KeyValuePair <string, object>("@UserModuleID", usermoduleIDControl)); ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID)); SQLHandler objSql = new SQLHandler(); NewsLetterSettingsInfo newsLetterSettingObj = objSql.ExecuteAsObject <NewsLetterSettingsInfo>("dbo.sp_NewsLetterSettingsGetAll", ParaMeterCollection); if (newsLetterSettingObj != null) { ddlSubscriptionType.SelectedIndex = ddlSubscriptionType.Items.IndexOf(ddlSubscriptionType.Items.FindByValue(newsLetterSettingObj.SubscriptionType.ToString())); txtSubscriptionModuleTitle.Text = newsLetterSettingObj.SubscriptionModuleTitle.ToString(); txtSubscriptionHelpText.Text = newsLetterSettingObj.SubscriptionHelpText.ToString(); txtTextBoxWaterMark.Text = newsLetterSettingObj.TextBoxWaterMarkText.ToString() != ""?newsLetterSettingObj.TextBoxWaterMarkText.ToString():"Email Address Required"; txtSubmitButtonText.Text = newsLetterSettingObj.SubmitButtonText.ToString(); } } catch (Exception ex) { ProcessException(ex); } }
private void GetNewsLetterSettings() { List <KeyValuePair <string, object> > ParaMeterCollection = new List <KeyValuePair <string, object> >(); ParaMeterCollection.Add(new KeyValuePair <string, object>("@UserModuleID", usermoduleIDControl)); ParaMeterCollection.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID)); SQLHandler objSql = new SQLHandler(); newsLetterSettingObj = objSql.ExecuteAsObject <NewsLetterSettingsInfo>("dbo.sp_NewsLetterSettingsGetAll", ParaMeterCollection); lblHelpText.Text = "<p>" + newsLetterSettingObj.SubscriptionHelpText.ToString() + "</p>"; txtWatermarkExtender.WatermarkText = newsLetterSettingObj.TextBoxWaterMarkText.ToString() != "" ? newsLetterSettingObj.TextBoxWaterMarkText.ToString() : "Email Address Required"; btnSubscribe.Text = newsLetterSettingObj.SubmitButtonText.ToString(); btnSubscribe.ToolTip = newsLetterSettingObj.SubmitButtonText.ToString(); }