private void Save() { try { if (txtDisplayTitle.Text.Trim() != string.Empty && txtLastEdndent.Text.Trim() != string.Empty && txtMaxDescriptionsLength.Text.Trim() != string.Empty && txtMaxNumberofPosts.Text.Trim() != string.Empty && txtRssURL.Text.Trim() != string.Empty) { if (hdnRssURLID.Value != string.Empty && hdnMaxNumberofPostsID.Value != string.Empty && hdnMaxDescriptionsLengthID.Value != string.Empty && hdnLastEdndentID.Value != string.Empty && hdnDisplayTitleID.Value != string.Empty) { int URLID = Int32.Parse(hdnRssURLID.Value); int MaxNumberofPostsID = Int32.Parse(hdnMaxNumberofPostsID.Value); int MaxDescriptionsLengthID = Int32.Parse(hdnMaxDescriptionsLengthID.Value); int LastEdndentID = Int32.Parse(hdnLastEdndentID.Value); int DisplayTitleID = Int32.Parse(hdnDisplayTitleID.Value); int UserModuleID = Int32.Parse(hdnUserModuleID.Value); RSSReaderSettingValueInfo objRssSetingInfo = new RSSReaderSettingValueInfo(); objRssSetingInfo.PortalID = GetPortalID; objRssSetingInfo.CultureName = GetCurrentCultureName; objRssSetingInfo.UserModuleID = UserModuleID; objRssSetingInfo.AddedOn = DateTime.Now; objRssSetingInfo.UpdatedOn = DateTime.Now; objRssSetingInfo.AddedBy = GetUsername; objRssSetingInfo.UpdatedBy = GetUsername; #region "Save Logic" RSSReaderSettingValueController con = new RSSReaderSettingValueController(); //for 1 objRssSetingInfo.RSSReaderSettingValueID = URLID; objRssSetingInfo.SettingValue = txtRssURL.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 2 objRssSetingInfo.RSSReaderSettingValueID = MaxNumberofPostsID; objRssSetingInfo.SettingValue = txtMaxNumberofPosts.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 3 objRssSetingInfo.RSSReaderSettingValueID = MaxDescriptionsLengthID; objRssSetingInfo.SettingValue = txtMaxDescriptionsLength.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 4 objRssSetingInfo.RSSReaderSettingValueID = LastEdndentID; objRssSetingInfo.SettingValue = txtLastEdndent.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 5 objRssSetingInfo.RSSReaderSettingValueID = DisplayTitleID; objRssSetingInfo.SettingValue = txtDisplayTitle.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); #endregion ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageRssReader/ModuleLocalText", "SettingSavedSuccessfully"), "", SageMessageType.Success); } } else { //Show message ShowMessage(SageMessageTitle.Notification.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageRssReader/ModuleLocalText", "PleaseFillSettingValues"), "", SageMessageType.Error); } } catch (Exception ex) { ProcessException(ex); } }
private void Save() { try { if (txtDisplayTitle.Text.Trim() != string.Empty && txtLastEdndent.Text.Trim() != string.Empty && txtMaxDescriptionsLength.Text.Trim() != string.Empty && txtMaxNumberofPosts.Text.Trim() != string.Empty && txtRssURL.Text.Trim() != string.Empty) { if (hdnRssURLID.Value != string.Empty && hdnMaxNumberofPostsID.Value != string.Empty && hdnMaxDescriptionsLengthID.Value != string.Empty && hdnLastEdndentID.Value != string.Empty && hdnDisplayTitleID.Value != string.Empty) { int URLID = Int32.Parse(hdnRssURLID.Value); int MaxNumberofPostsID = Int32.Parse(hdnMaxNumberofPostsID.Value); int MaxDescriptionsLengthID = Int32.Parse(hdnMaxDescriptionsLengthID.Value); int LastEdndentID = Int32.Parse(hdnLastEdndentID.Value); int DisplayTitleID = Int32.Parse(hdnDisplayTitleID.Value); int UserModuleID = Int32.Parse(hdnUserModuleID.Value); RSSReaderSettingValueInfo objRssSetingInfo = new RSSReaderSettingValueInfo(); objRssSetingInfo.PortalID = GetPortalID; objRssSetingInfo.CultureName = GetCurrentCultureName; objRssSetingInfo.UserModuleID = UserModuleID; objRssSetingInfo.AddedOn = DateTime.Now; objRssSetingInfo.UpdatedOn = DateTime.Now; objRssSetingInfo.AddedBy = GetUsername; objRssSetingInfo.UpdatedBy = GetUsername; #region "Save Logic" RSSReaderSettingValueController con = new RSSReaderSettingValueController(); //for 1 objRssSetingInfo.RSSReaderSettingValueID = URLID; objRssSetingInfo.SettingValue = txtRssURL.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 2 objRssSetingInfo.RSSReaderSettingValueID = MaxNumberofPostsID; objRssSetingInfo.SettingValue = txtMaxNumberofPosts.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 3 objRssSetingInfo.RSSReaderSettingValueID = MaxDescriptionsLengthID; objRssSetingInfo.SettingValue = txtMaxDescriptionsLength.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 4 objRssSetingInfo.RSSReaderSettingValueID = LastEdndentID; objRssSetingInfo.SettingValue = txtLastEdndent.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); //for 5 objRssSetingInfo.RSSReaderSettingValueID = DisplayTitleID; objRssSetingInfo.SettingValue = txtDisplayTitle.Text.Trim(); con.SaveRssSettings(objRssSetingInfo); #endregion ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageRssReader/ModuleLocalText", "SettingSavedSuccessfully"), "", SageMessageType.Success); } } else { //Show message ShowMessage(SageMessageTitle.Notification.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/SageRssReader/ModuleLocalText", "PleaseFillSettingValues"), "", SageMessageType.Error); } } catch (Exception ex) { ProcessException(ex); } }