protected void inputVarBTN_Click(object sender, EventArgs e) { variableBO vBO = new variableBO(); locationsBO loBO = new locationsBO(); variablesBLL vBLL = new variablesBLL(); locationsBLL loBLL = new locationsBLL(); int loResult = 0; int vResult = 0; vBO.variableName = varInputTB.Text; loBO.excelPageID = int.Parse(varExcpageDDL.SelectedValue); loBO.col = varInputColTB.Text; loBO.row = int.Parse(varInputRowTB.Text); loBO.concatLoc = varExcpageDDL.SelectedItem.Text + varInputColTB.Text + varInputRowTB.Text; vBO.boID = int.Parse(varInputvbObjectDDL.SelectedValue); vBO.description = varInputDescriptionTB.Text; try { //returns locationID loResult = loBLL.insert(loBO); if (loResult > 0) { //locationID becomes the locationid for the variablebo vBO.locationID = loResult; try { //returns variableID vResult = vBLL.insert(vBO); if(vResult > 0) { try { equivLocationBO eqLocBO = new equivLocationBO(); equivLocationBLL eqLocBLL = new equivLocationBLL(); eqLocBO.locationID1 = vResult; foreach (ListItem li in varInputEqLocDDCB.Items) { if (li.Selected) { eqLocBO.locationID2 = int.Parse(li.Value); eqLocBLL.insert(eqLocBO); } } inputVLabel.Text = "Insert New variable Successful."; } catch (Exception eee) { inputVLabel.Text = eee.Message.ToString(); } finally { vBLL = null; vBO = null; } } else { inputVLabel.Text = "Insert new Variable Failed."; } } catch(Exception eee) { inputVLabel.Text = eee.Message.ToString(); } finally { vBLL = null; vBO = null; } } else { inputLLabel.Text = "Insert New Location Failed."; } } catch (Exception ee) { inputLLabel.Text = ee.Message.ToString(); } finally { loBO = null; loBLL = null; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)