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)));
     }
 }
Exemple #2
0
		private void detach_Integrations(Integration entity)
		{
			this.SendPropertyChanging();
			entity.School = null;
		}
Exemple #3
0
 partial void DeleteIntegration(Integration instance);
Exemple #4
0
 partial void UpdateIntegration(Integration instance);
Exemple #5
0
 partial void InsertIntegration(Integration instance);
Exemple #6
0
		private void attach_Integrations(Integration entity)
		{
			this.SendPropertyChanging();
			entity.Cycle = this;
		}