public void ModifyFaq(DTO_Faq faq) { //gestione errori... try { if (!oModule.Admin && !oModule.ModifyFaq) { throw new Exception("No permission"); } service.UpdateFaq(faq.ID, faq.Question, faq.Answer, this.CovnertDTO_CategoryInListInt64(faq.Categories), faq.Order); View.ShowFaqModified(faq, true); } catch { View.ShowFaqModified(faq, false); } }
public void InsertFaq(DTO_Faq faq) { try { if (!oModule.Admin && !oModule.CreateFaq) { throw new Exception("No permission"); } service.CreateFaq(UserContext.CurrentCommunityID, faq.Question, faq.Answer, this.CovnertDTO_CategoryInListInt64(faq.Categories)); View.ShowFaqInserted(faq, true); } catch { View.ShowFaqInserted(faq, false); } }