/// <summary> /// 添加简历 /// </summary> /// <param name="resume"></param> /// <returns></returns> public static bool AddResume(Resume resume) { if (resume == null) { return(false); } StringBuilder sb = new StringBuilder(); sb.Append("insert into resume (name,mobile,email,school,education,workyear,companynow,positionnow,area,position,summary,posttime)"); sb.Append(" values (@name,@mobile,@email,@school,@education,@workyear,@companynow,@positionnow,@area,@position,@summary,@posttime)"); SqlParameter[] para = { new SqlParameter("@name", resume.Name), new SqlParameter("@mobile", resume.Mobile), new SqlParameter("@email", resume.Email), new SqlParameter("@school", resume.School), new SqlParameter("@education", resume.Education), new SqlParameter("@workyear", resume.WorkYear), new SqlParameter("@companynow", resume.CompanyNow), new SqlParameter("@positionnow", resume.PositionNow), new SqlParameter("@area", resume.Area), new SqlParameter("@position", resume.Position), new SqlParameter("@summary", resume.Summary), new SqlParameter("@posttime", resume.PostTime) }; int n = MsSQLHelper.ExecuteNonQuery(sb.ToString(), CommandType.Text, para); if (n == 1) { return(true); } return(false); }
/// <summary> /// 添加发送日志到数据库 /// </summary> /// <param name="log"></param> /// <returns></returns> public static bool Add() { Model.Log log = new Model.Log(); StringBuilder sb = new StringBuilder(); sb.Append("insert into logs (sendtime) values (@sendtime)"); SqlParameter[] paras = { new SqlParameter("@sendtime", log.SendTime) }; int n = MsSQLHelper.ExecuteNonQuery(sb.ToString(), CommandType.Text, paras); if (n == 1) { return(true); } return(false); }