public void AddFAQ()
 {
     try
     {
         FAQController clt = new FAQController();
         FAQInfo obj = new FAQInfo();
         if (Session["FAQId"] != null && Session["FAQId"].ToString() != string.Empty)
         {
             FAQId = Int32.Parse(Session["FAQId"].ToString());
             obj.FAQId = FAQId;
         }
         else
         {
             obj.FAQId = 0;
         }
         obj.UserName = GetUsername;
         obj.Question = txtQuestion.Text;
         obj.Answer = CkEditorFAQAnswer.Text;
         obj.PortalID = GetPortalID;
         obj.AddedBy = GetUsername;
         obj.CultureName = GetCurrentCulture();
         obj.UserModuleID = int.Parse(SageUserModuleID);
         obj.EmailAddress = "";
         obj.CategoryID = Convert.ToInt32(ddlCategory.SelectedItem.Value);
         obj.IsActive = true;
         clt.SaveFAQ(obj);
         ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/FAQ/ModuleLocalText", "FAQSaveSuccessfully"), "", SageMessageType.Success);
         HideForm();
         LoadFAQList();
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Beispiel #2
0
 public void AddFAQ()
 {
     try
     {
         FAQController clt = new FAQController();
         FAQInfo       obj = new FAQInfo();
         if (Session["FAQId"] != null && Session["FAQId"].ToString() != string.Empty)
         {
             FAQId     = Int32.Parse(Session["FAQId"].ToString());
             obj.FAQId = FAQId;
         }
         else
         {
             obj.FAQId = 0;
         }
         obj.UserName     = GetUsername;
         obj.Question     = txtQuestion.Text;
         obj.Answer       = CkEditorFAQAnswer.Text;
         obj.PortalID     = GetPortalID;
         obj.AddedBy      = GetUsername;
         obj.CultureName  = GetCurrentCulture();
         obj.UserModuleID = int.Parse(SageUserModuleID);
         obj.EmailAddress = "";
         obj.CategoryID   = Convert.ToInt32(ddlCategory.SelectedItem.Value);
         obj.IsActive     = true;
         clt.SaveFAQ(obj);
         ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/FAQ/ModuleLocalText", "FAQSaveSuccessfully"), "", SageMessageType.Success);
         HideForm();
         LoadFAQList();
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Beispiel #3
0
 private void EditCategory(int catID)
 {
     try
     {
         dvUpdateCategory.Visible = true;
         FAQController ctl = new FAQController();
         FAQInfo       obj = ctl.GetCategoryByID(catID, GetPortalID, int.Parse(SageUserModuleID));
         txtCategoryName.Text      = obj.CategoryName;
         ddlCategory.SelectedValue = Convert.ToString(obj.CategoryID);
         Session["CategoryID"]     = obj.CategoryID;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Beispiel #4
0
 private void EditFAQ(int FAQid)
 {
     try
     {
         ShowForm();
         FAQController ctl = new FAQController();
         FAQInfo       obj = ctl.GetFAQByID(FAQid, GetPortalID, int.Parse(SageUserModuleID));
         txtQuestion.Text                  = obj.Question;
         CkEditorFAQAnswer.Text            = obj.Answer;
         Session["FAQId"]                  = obj.FAQId;
         ddlCategory.SelectedItem.Selected = false;
         ddlCategory.Items.FindByText(obj.CategoryName).Selected = true;
     }
     catch (Exception e)
     {
         throw e;
     }
 }