Пример #1
0
 partial void DeleteQuestionInfo(QuestionInfo instance);
Пример #2
0
 partial void InsertQuestionInfo(QuestionInfo instance);
Пример #3
0
 partial void UpdateQuestionInfo(QuestionInfo instance);
Пример #4
0
 /// <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;
 }