Ejemplo n.º 1
0
 public static void InsertSubjects(subject subj)
 {
     using (ASMDataContext context = new ASMDataContext())
     {
         context.subjects.InsertOnSubmit(subj);
         context.SubmitChanges();
     }
 }
Ejemplo n.º 2
0
        protected void AddNewDate_Click(object sender, EventArgs e)
        {
            int SubjectId = 0;

            int.TryParse(SubjectIdHiddenField.Value, out SubjectId);

            subject obj = new DataAccess.subject();

            obj.sname = SubNameTextBox.Text;
            obj.scode = SubCodeTextBox.Text;
            obj.Id    = SubjectId;

            Manager.InsertSubjects(obj);

            Response.Redirect(String.Format("AddSubjects.aspx?SubjectId={0}", obj.Id));
            AddNewRowToGrid();
        }
Ejemplo n.º 3
0
 partial void Deletesubject(subject instance);
Ejemplo n.º 4
0
 partial void Updatesubject(subject instance);
Ejemplo n.º 5
0
 partial void Insertsubject(subject instance);