예제 #1
0
        protected void btn_upload_Click(object sender, EventArgs e)
        {
            Education education = new Education();

            education.FK_School    = 1;
            education.Degree       = txt_degree.Text;
            education.FieldOfStudy = txt_fieldofstudy.Text;
            education.Grade        = txt_grade.Text;
            education.Activities   = Request.Form["S1"];
            education.From_Year    = Convert.ToInt32(ddl_fromyear.SelectedValue);
            education.To_Year      = Convert.ToInt32(ddl_toyear.SelectedValue);
            education.Description  = Request.Form["S2"];
            context.Education_Insert(education.FK_School, education.Degree, education.FieldOfStudy, education.Grade, education.Activities, education.From_Year, education.To_Year, education.Description, education.FK_Member);
            context.SaveChanges();
            Response.Redirect("ViewEducation.aspx");
        }
예제 #2
0
 public bool Add(Education e)
 {
     //to return entity if added or null if failed
     return(link.Education_Insert(e.FK_School, e.Degree, e.FieldOfStudy, e.Grade, e.Activities, e.From_Year, e.To_Year, e.Description, e.ID) > 0);
 }