protected void btnAdd_Click(object sender, EventArgs e) { int schoolId = 0; if (int.TryParse(this.hdnSchoolId.Value, out schoolId) && string.IsNullOrEmpty(this.hdnDisIntegID.Value)) { SupplySystem.Integration itg = new SupplySystem.Integration { SchoolID = schoolId, CycleID = Public.ActiveCycle.CycleID, IntegrationMode = (byte)Public.IntegrationMode.DisIntegration, SubmitDate = DateTime.Now }; db.Integrations.InsertOnSubmit(itg); db.SubmitChanges(); Response.Redirect(string.Format("~/School/School.aspx?dtg={0}", TamperProofString.QueryStringEncode(itg.IntegrationID.ToString()))); } else if (!string.IsNullOrEmpty(this.hdnDisIntegID.Value)) { Response.Redirect(string.Format("~/School/School.aspx?dtg={0}", TamperProofString.QueryStringEncode(this.hdnDisIntegID.Value))); } }
private void detach_Integrations(Integration entity) { this.SendPropertyChanging(); entity.School = null; }
partial void DeleteIntegration(Integration instance);
partial void UpdateIntegration(Integration instance);
partial void InsertIntegration(Integration instance);
private void attach_Integrations(Integration entity) { this.SendPropertyChanging(); entity.Cycle = this; }