partial void DeleteQuestionInfo(QuestionInfo instance);
partial void InsertQuestionInfo(QuestionInfo instance);
partial void UpdateQuestionInfo(QuestionInfo instance);
/// <summary> /// 新增咨询 /// </summary> /// <param name="title"></param> /// <param name="content"></param> /// <param name="createdate"></param> /// <param name="createuser"></param> /// <returns></returns> public static int InsertQuestion(string title, string content, DateTime createdate,int createuser) { QuestionInfo qi = new QuestionInfo(); qi.TITLE = title; qi.QuestionContent = content; qi.CreateUser = createuser; qi.CreateDate = createdate; qi.Status = 0; using (DataClasses1DataContext db = new DataClasses1DataContext()) { db.Log = Console.Out; db.QuestionInfo.InsertOnSubmit(qi); db.SubmitChanges(); } return qi.ID; }