public static bool SentSuccessNews(int aid) { string sql = "INSERT INTO [news] ([Sid], [Ntitle], [Ncontent], [Ntime]) VALUES (@Sid, @Ntitle, @Ncontent, @Ntime)"; Apply apply = DNews.GetApply(aid); string title = apply.Cname + "-" + apply.Jname + "-提档通知"; string content = "亲爱的" + apply.Sname + "同学:\n\t您在" + apply.Adatetime + "的时候向" + apply.Cname + "公司" + apply.Jname + "职位投递的简历已被提档,请等待面试通知.\n\t祝您面试顺利!"; SqlParameter[] parm = new SqlParameter[] { new SqlParameter("@Sid", apply.Sid), new SqlParameter("@Ntitle", title), new SqlParameter("@Ncontent", content), new SqlParameter("@Ntime", DateTime.Now), }; int line = DBHelper.ExecuteNonQuery(sql, parm); DBHelper.SqlClose(); if (line > 0) { if (DEmploy.Employ(apply.Jid, apply.Sid)) { return(true); } } return(false); }
public static bool SentFailNews(int aid) { string sql = "INSERT INTO [news] ([Sid], [Ntitle], [Ncontent], [Ntime]) VALUES (@Sid, @Ntitle, @Ncontent, @Ntime)"; Apply apply = DNews.GetApply(aid); string title = apply.Cname + "-" + apply.Jname + "-退回通知"; string content = "亲爱的" + apply.Sname + "同学:\n\t您在" + apply.Adatetime + "的时候向" + apply.Cname + "公司" + apply.Jname + "职位投递的简历已被退回."; SqlParameter[] parm = new SqlParameter[] { new SqlParameter("@Sid", apply.Sid), new SqlParameter("@Ntitle", title), new SqlParameter("@Ncontent", content), new SqlParameter("@Ntime", DateTime.Now), }; int line = DBHelper.ExecuteNonQuery(sql, parm); DBHelper.SqlClose(); return(line > 0); }