protected void btnAddRoute_Click(object sender, EventArgs e) { try { //DataTable _dt = new DataTable(); //_dt = objClassAdmin.GetLatLong(Convert.ToInt32(ddlFromCity.SelectedValue), Convert.ToInt32(ddlToCity.SelectedValue)); int result = objClassAdmin.SaveStagePlan(Convert.ToInt32(hdnStagePlanId.Value), Convert.ToInt32(hdnClassId.Value), Convert.ToInt32(ddlFromCity.SelectedValue), Convert.ToInt32(ddlToCity.SelectedValue)); // double.Parse(locationElement.Element("lat").ToString(), System.Globalization.CultureInfo.InvariantCulture); if (result > 0) { _BindData(); string popupScript = "alert('" + (string)GetLocalResourceObject("StageLegAdded") + "');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); //grdStagePlan.DataBind(); } else { string popupScript = "alert('Operation failed!');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); } totalDistance = 0; totalDistanceCovered = 0; grdStagePlan.DataBind(); } catch (Exception ex) {} }
protected void btnAddRoute_Click(object sender, EventArgs e) { //DataTable _dt = new DataTable(); //_dt = objClassAdmin.GetLatLong(Convert.ToInt32(ddlFromCity.SelectedValue), Convert.ToInt32(ddlToCity.SelectedValue)); try { int result = objClassAdmin.SaveStagePlan(Convert.ToInt32(hdnStagePlanId.Value), Convert.ToInt32(hdnClassId.Value), Convert.ToInt32(ddlFromCity.SelectedValue), Convert.ToInt32(ddlToCity.SelectedValue)); if (result > 0) { _BindData(); string popupScript = "alert('Etappe erfolgreich hinzugefügt');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); //grdStagePlan.DataBind(); } else { string popupScript = "alert('Operation failed!');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); } totalDistance = 0; totalDistanceCovered = 0; grdStagePlan.DataBind(); } catch (Exception) {} }
protected void btnAddRoute_Click(object sender, EventArgs e) { int result = objClassAdmin.SaveStagePlan(Convert.ToInt32(hdnStagePlanId.Value), Convert.ToInt32(hdnClassId.Value), Convert.ToInt32(ddlFromCity.SelectedValue), Convert.ToInt32(ddlToCity.SelectedValue)); if (result > 0) { _BindData(); string popupScript = "alert('Stage plan leg added successfully!');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); } else { string popupScript = "alert('Operation failed!');"; ClientScript.RegisterStartupScript(Page.GetType(), "script", popupScript, true); } grdStagePlan.DataBind(); }