Exemple #1
0
 protected void Add_Btn_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         Job job = new Job();
         job.Title   = Title.Text.ToString();
         job.Click   = Int32.Parse(Click.Text.ToString());
         job.Content = Content.Value.ToString();
         JobSystem jobSystem = new JobSystem();
         if (jobSystem.Add_Job(job) > 0)
         {
             Response.Write("<script>alert('添加成功');location.href='Get_Job.aspx';</script>");
         }
         else
         {
             Response.Write("<script>alert('添加失败');history.back(1);</script>");
         }
     }
 }