public FaqDS.FaqRow GetFaq(int FaqId) { DataView dv = GetFaqs(string.Format("{0}", FaqId)); FaqDS.FaqRow row = (FaqDS.FaqRow)dv[0].Row; return(row); }
/* Start Faqs */ public bool AddFaq(string Question, string Answer, int GroupId, int Sort) { FaqDS.FaqRow row = DS.Faq.NewFaqRow(); row.Question = Question; row.Answer = Answer; row.GroupId = GroupId; row.Sort = Sort; ds.Faq.Rows.Add(row); AcceptChanges(); return(true); }
public bool DeleteFaq(int FaqId) { DataView dv = this.GetFaqs(string.Format("FaqId = {0}", FaqId)); if (dv.Count <= 0) { return(false); } FaqDS.FaqRow row = (FaqDS.FaqRow)dv[0].Row; row.Delete(); AcceptChanges(); return(true); }
public bool UpdateFaq(int FaqId, string Question, string Answer, int GroupId, int Sort) { DataView dv = this.GetFaqs(string.Format("FaqId = {0}", FaqId)); if (dv.Count <= 0) { return(false); } FaqDS.FaqRow row = (FaqDS.FaqRow)dv[0].Row; row.Question = Question; row.Answer = Answer; row.GroupId = GroupId; row.Sort = Sort; row.Table.AcceptChanges(); AcceptChanges(); return(true); }