protected void btnSaveData_Click(object sender, EventArgs e) { string user_name = Session["USER_NAME"] as string; //string user_name = "stefan21"; objDataHandling.user_name = user_name; objDataHandling.flow_data = Convert.ToString(input_country_list.InnerText); objDataHandling.remarks = Convert.ToString(txtRemarks.Text); objDataHandling.type = "Map"; string queryId = Request.QueryString["queryId"]; if (queryId != null) { objDataHandling.UpdateData(queryId); string script = "alert('" + "Data has been updated successfully" + "');"; ScriptManager.RegisterStartupScript(this, typeof(Page), "UserSecurity", script, true); } else { //objDataHandling.SaveData(); string script = "alert('" + "Data has been saved successfully" + "');"; ScriptManager.RegisterStartupScript(this, typeof(Page), "UserSecurity", script, true); } }
protected void btnSave_Click(object sender, EventArgs e) { string user_name = Session["USER_NAME"] as string; objDataHandling.user_name = Session["USER_NAME"] as string; objDataHandling.flow_data = Convert.ToString(input_flow_data.InnerText); objDataHandling.remarks = Convert.ToString(txtRemarks.Text); objDataHandling.project_name = Convert.ToString(txtproject_name.Text); objDataHandling.type = "Sankey"; objDataHandling.node_data = Convert.ToString(input_node_data.InnerText); objDataHandling.default_node_color = ""; objDataHandling.default_flow_color = ""; objDataHandling.background_color = Convert.ToString(background_color.Text); // "#ffffff"; objDataHandling.drag_option = show_labels.Checked; objDataHandling.curviness = Convert.ToDouble(curvature.Value); // 0.5; objDataHandling.diagram_width = Convert.ToInt32(canvas_width.Text); // 900; objDataHandling.diagram_height = Convert.ToInt32(canvas_height.Text); // 900; objDataHandling.flow_opacity = Convert.ToDouble(default_flow_opacity.Value); // 0.9; objDataHandling.node_opacity = Convert.ToDouble(default_node_opacity.Value); // 0.9; objDataHandling.border = Convert.ToInt32(node_border.SelectedIndex); // 1; objDataHandling.level_visibility = show_labels.Checked; objDataHandling.font_face = Convert.ToString(font_face.SelectedIndex); objDataHandling.font_size = Convert.ToInt32(font_size.Text); // 12; objDataHandling.font_color = Convert.ToString(font_color.Text); // "#add8e6"; objDataHandling.unit_name = Convert.ToString(unit_name.Text); objDataHandling.flow_width = Convert.ToDouble(flow_width.Value); objDataHandling.node_height = Convert.ToDouble(node_height.Value); string job_id = Request.QueryString["job_id"]; if (job_id != null) { objDataHandling.UpdateData(job_id); string script = "alert('" + "Data has been updated successfully" + "');"; ScriptManager.RegisterStartupScript(this, typeof(System.Web.UI.Page), "UserSecurity", script, true); } else { job_id = objDataHandling.createJobID(user_name); objDataHandling.SaveData(job_id); string script = "alert('" + "Data has been saved successfully" + "');"; ScriptManager.RegisterStartupScript(this, typeof(System.Web.UI.Page), "UserSecurity", script, true); } }