public static DA.Course CreateCourse(DA.Semester Semester_Parameter, DA.Teacher Teacher_Parameter, string Number_Parameter, string Name_Parameter, DO.CourseStatus Status_Parameter) { DA.SampleDataContext context = new DA.SampleDataContext(); DA.Course obj = CreateCourse(context, Semester_Parameter, Teacher_Parameter, Number_Parameter, Name_Parameter, Status_Parameter); context.SubmitChanges(); DA.Course.OnCacheNeedsRefresh(); return(obj); }
public void DataBind(Semester obj) { if (obj != null) { this.ObjectID = obj.ID; this.BeginField.SelectedDate = obj.Begin; this.EndField.SelectedDate = obj.End; this.NameField.Text = obj.Name; } }
public static DA.Semester CreateSemester(DateTime Begin_Parameter, DateTime End_Parameter, string Name_Parameter) { DA.SampleDataContext context = new DA.SampleDataContext(); DA.Semester obj = CreateSemester(context, Begin_Parameter, End_Parameter, Name_Parameter); context.SubmitChanges(); DA.Semester.OnCacheNeedsRefresh(); return(obj); }
public static void DeleteSemester(DA.SampleDataContext context, int id) { DA.Semester obj = GetByID(context, id); PerformPreDeleteLogic(context, obj); context.Semesters.DeleteOnSubmit(obj); PerformPostDeleteLogic(context, obj); }
public static Course CreateCourse(Semester Semester_Parameter, Teacher Teacher_Parameter, string Number_Parameter, string Name_Parameter, CourseStatus Status_Parameter) { SampleObjectContext context = new SampleObjectContext(); Course obj = CreateCourse(context, Semester_Parameter, Teacher_Parameter, Number_Parameter, Name_Parameter, Status_Parameter); context.AcceptAllChanges(); Course.OnCacheNeedsRefresh(); return obj; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); string idString = this.Request.QueryString["ID"]; int id; if (int.TryParse(idString, out id)) { this.Semester = SemesterLogic.GetByID(this.DataContext, id); if (!this.IsPostBack) this.EditControl.DataBind(this.Semester); } }
public static DA.Semester CreateSemester(DA.SampleDataContext context, DateTime Begin_Parameter, DateTime End_Parameter, string Name_Parameter) { DA.Semester obj = new DA.Semester(); obj.Begin = Begin_Parameter; obj.End = End_Parameter; obj.Name = Name_Parameter; Validate(context, obj); PerformPreCreateLogic(context, obj); context.Semesters.InsertOnSubmit(obj); PerformPostCreateLogic(context, obj); return(obj); }
public static Course CreateCourse(SampleObjectContext context, Semester Semester_Parameter, Teacher Teacher_Parameter, string Number_Parameter, string Name_Parameter, CourseStatus Status_Parameter) { Course obj = new Course(); obj.Semester = Semester_Parameter; obj.Teacher = Teacher_Parameter; obj.Number = Number_Parameter; obj.Name = Name_Parameter; obj.Status = Status_Parameter; Validate(context, obj); PerformPreCreateLogic(context, obj); context.Courses.AddObject(obj); PerformPostCreateLogic(context, obj); return obj; }
public static DA.Course CreateCourse(DA.SampleDataContext context, DA.Semester Semester_Parameter, DA.Teacher Teacher_Parameter, string Number_Parameter, string Name_Parameter, DO.CourseStatus Status_Parameter) { DA.Course obj = new DA.Course(); obj.Semester = Semester_Parameter; obj.Teacher = Teacher_Parameter; obj.Number = Number_Parameter; obj.Name = Name_Parameter; obj.Status = Status_Parameter; Validate(context, obj); PerformPreCreateLogic(context, obj); context.Courses.InsertOnSubmit(obj); PerformPostCreateLogic(context, obj); return(obj); }
private void OnSaved(Semester obj) { if (this.Saved != null) this.Saved(this, obj); }
/// <summary>When implemented, allows logic to be performed before the object is created using the supplied data context.</summary> static partial void PerformPreCreateLogic(DA.SampleDataContext context, DA.Semester obj);
/// <summary>When implemented, allows logic to be performed before the object is deleted using the supplied data context.</summary> partial static void PerformPreDeleteLogic(SampleObjectContext context, Semester obj);
/// <summary>When implemented, allows logic to be performed after the object is created using the supplied data context.</summary> partial static void PerformPostCreateLogic(SampleObjectContext context, Semester obj);
public static Semester CreateSemester(SampleObjectContext context, DateTime Begin_Parameter, DateTime End_Parameter, string Name_Parameter) { Semester obj = new Semester(); obj.Begin = Begin_Parameter; obj.End = End_Parameter; obj.Name = Name_Parameter; Validate(context, obj); PerformPreCreateLogic(context, obj); context.Semesters.AddObject(obj); PerformPostCreateLogic(context, obj); return obj; }
private void OnDelete(Semester obj) { if (this.Delete != null) this.Delete(this, obj); }
private void OnEdit(Semester obj) { if (this.Edit != null) this.Edit(this, obj); }
public static DA.Semester LoadSemesterFromDataContext(this DA.Semester obj, DA.SampleDataContext dataContext) { return(DA.Semester.GetByID(dataContext, obj.ID)); }
/// <summary>When implemented, validates that the object conforms to standard business rules using the supplied data context.</summary> partial static void Validate(SampleObjectContext context, Semester obj);
public static DA.Semester CreateSemester(DA.SampleDataContext context, DateTime Begin_Parameter, DateTime End_Parameter, string Name_Parameter) { DA.Semester obj = new DA.Semester(); obj.Begin = Begin_Parameter; obj.End = End_Parameter; obj.Name = Name_Parameter; Validate(context, obj); PerformPreCreateLogic(context, obj); context.Semesters.InsertOnSubmit(obj); PerformPostCreateLogic(context, obj); return obj; }
protected void ListControl_Delete(object sender, Semester obj) { SemesterLogic.DeleteSemester(this.DataContext, obj.ID); this.DataContext.AcceptAllChanges(); BindList(); }
/// <summary>When implemented, validates that the object conforms to standard business rules using the supplied data context.</summary> static partial void Validate(DA.SampleDataContext context, DA.Semester obj);
protected void ListControl_Edit(object sender, Semester obj) { Response.Redirect(string.Format("Edit.aspx?ID={0}", obj.ID)); }
/// <summary>When implemented, allows logic to be performed after the object is deleted using the supplied data context.</summary> static partial void PerformPostDeleteLogic(DA.SampleDataContext context, DA.Semester obj);
protected void EditControl_Saved(object sender, Semester obj) { this.Response.Redirect("Default.aspx"); }