//UPDATE DATA from TABLES protected void OnUpdate_Click(object sender, EventArgs e) { Call_Database updateEntry = new Call_Database(); RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem; if (LeadershipDisplay.Items.FindByValue("OutdoorsInfo").Selected == true) { string Action = "OutdoorsInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditLocation = (item.FindControl("EditLocation") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditArea = (item.FindControl("EditArea") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDedication = (item.FindControl("EditDedication") as TextBox).Text; updateEntry.FormUPDATE(Action, EditLocation, EditName, EditArea, EditPlaque, EditDedication, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum1.DataSource = update.dbOutdoors; RepeaterNum1.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("ChapelInfo").Selected == true) { string Action = "ChapelInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); float EditOrder = float.Parse((OrderShow.FindControl("EditOrder") as TextBox).Text); string EditLevel = (item.FindControl("EditLevel") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditSort = (item.FindControl("EditSort") as TextBox).Text; updateEntry.FormUPDATE(Action, EditLevel, EditPlaque, EditSort, null, null, updateId, 0, 0, EditOrder); Call_Database update = new Call_Database(); RepeaterNum2.DataSource = update.dbChapel; RepeaterNum2.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("CommonsInfo").Selected == true) { string Action = "CommonsInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbCommons; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("FisherHallInfo").Selected == true) { string Action = "FisherHallInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbFisherHall; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("FitnessCenterInfo").Selected == true) { string Action = "FitnessCenterInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbFitnessCenter; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("LibraryInfo").Selected == true) { string Action = "LibraryInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbLibrary; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("ResHallInfo").Selected == true) { string Action = "ResHallInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbResidence; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("SwartsHallInfo").Selected == true) { string Action = "SwartsHallInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbSwartsHall; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("BlaisdellHallInfo").Selected == true) { string Action = "BlaisdellHallInfoUPDATE"; int updateId = int.Parse((item.FindControl("idLabel") as Label).Text); string EditRoomId = (item.FindControl("EditRoomId") as TextBox).Text; string EditName = (item.FindControl("EditName") as TextBox).Text; string EditPlaque = (item.FindControl("EditPlaque") as TextBox).Text; string EditDate = (item.FindControl("EditDate") as TextBox).Text; updateEntry.FormUPDATE(Action, EditRoomId, EditName, EditPlaque, EditDate, null, updateId, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbBlaisdellHall; RepeaterNum3.DataBind(); } }
//INSERT DATA into MAP Tables protected void SubButton_Click(object sender, EventArgs e) { Call_Database callDB = new Call_Database(); if (LeadershipDisplay.Items.FindByValue("OutdoorsInfo").Selected == true) { string Action = "OutdoorsInfoINSERT"; callDB.FormINSERT(Action, txtLocation.Text, txtName.Text, txtArea.Text, txtPlaque.Text, txtDedication.Text, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum1.DataSource = update.dbOutdoors; RepeaterNum1.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("ChapelInfo").Selected == true) { string Action = "ChapelInfoINSERT"; float ChapelFloat = float.Parse((OrderShow.FindControl("txtOrder") as TextBox).Text); callDB.FormINSERT(Action, txtLevel.Text, txtPlaque.Text, txtSort.Text, null, null, 0, 0, 0, ChapelFloat); Call_Database update = new Call_Database(); RepeaterNum2.DataSource = update.dbChapel; RepeaterNum2.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("CommonsInfo").Selected == true) { string Action = "CommonsInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbCommons; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("FisherHallInfo").Selected == true) { string Action = "FisherHallInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbFisherHall; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("FitnessCenterInfo").Selected == true) { string Action = "FitnessCenterInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbFitnessCenter; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("LibraryInfo").Selected == true) { string Action = "LibraryInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbLibrary; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("ResHallInfo").Selected == true) { string Action = "ResHallInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbResidence; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("SwartsHallInfo").Selected == true) { string Action = "SwartsHallInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbSwartsHall; RepeaterNum3.DataBind(); } else if (LeadershipDisplay.Items.FindByValue("BlaisdellHallInfo").Selected == true) { string Action = "BlaisdellHallInfoINSERT"; callDB.FormINSERT(Action, txtRoomId.Text, txtName.Text, txtPlaque.Text, txtDate.Text, null, 0, 0, 0, 0); Call_Database update = new Call_Database(); RepeaterNum3.DataSource = update.dbBlaisdellHall; RepeaterNum3.DataBind(); } }