suneta

Members
  • Content count

    9
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by suneta


  1. HI,

    I tried to get print of fusion chart in my application by method given on link -http://www.fusioncharts.com/docs/JavaScript/JS_PrintManager.html

    but when i used it alone with single chart its working fine but when i integrate the same code in my application 'managed button' given in that will remain disabled all the time.so can any one resole this asap.

     

    Thanks,

     

    Suneta Satwani


  2. Hi Rahul,

    I am facing the some problem in printing of charts through java script. could you please suggest me another method for doing the same as i also tried it from another way of taking it as jpg image by clling server side method in java script and passing div contents in java script but in this case i am having exception of-'Error: Sys.Net.WebServiceFailedException:'.so please suggest another method .for the reference i am providing my code below:-

    1)java script method

    <script language=javascript>

    function CallPrint(strid) {

    var prtContent = document.getElementById(strid);

    PageMethods.saveImage(prtContent.innerHTML);

    }

    </script>

    2)Button through which we are calling java script

    <div style="width:100% ; height:35px ;float:right;text-align:right; padding:5px 5px 5px 5px;">

     

    <asp:ImageButton ID="imgbtnprint" runat="server" ImageUrl="~/images/print.png"

    OnClientClick ="javascript:CallPrint('ctl00_ContentPlaceHolder1_divprint')" />

    </div>

    3)Server side method

     

     

     

    [system.Web.Services.WebMethod]

    public static void saveImage(string strHtml)

    {

    WebsitesScreenshot.WebsitesScreenshot _WebsitesScreenshot = new WebsitesScreenshot.WebsitesScreenshot();

    WebsitesScreenshot.WebsitesScreenshot.Result _Result;

    _WebsitesScreenshot.ImageHeight = 750;

    _WebsitesScreenshot.TimeOutSeconds = 600;

    _WebsitesScreenshot.ImageWidth = 700;

    _Result = _WebsitesScreenshot.CaptureHTML(strHtml);

    if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Captured)

    {

    _WebsitesScreenshot.SaveImage("E:\\Projects\\IconIntelligent\\IconIntelligent\\ abc.jpg");

     

    }

    else if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Failed)

    {

     

    }

    else if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Timeout)

    {

     

    }

    _WebsitesScreenshot.Dispose();

    }

     

     

    In this we not taking print just saving a jpg image and getting exception on line-

    _Result = _WebsitesScreenshot.CaptureHTML(strHtml);

    While this is perfectly working in simple html case.so i need a method through which i can take print in any browser.

     

     

    Thanks,

    Suneta Satwani


  3. Hi Rahul,

    I am still facing the same problem in printing of charts through java script. could you please suggest me another method for doing the same as i also tried it from another way of taking it as jpg image by clling server side method in java script and passing div contents in java script but in this case i am having exception of-'Error: Sys.Net.WebServiceFailedException:'.so please suggest another method .for the reference i am providing my code below:-

    1)java script method

    <script language=javascript>

    function CallPrint(strid) {

    var prtContent = document.getElementById(strid);

    PageMethods.saveImage(prtContent.innerHTML);

    }

    </script>

    2)Button through which we are calling java script

    <div style="width:100% ; height:35px ;float:right;text-align:right; padding:5px 5px 5px 5px;">

     

    <asp:ImageButton ID="imgbtnprint" runat="server" ImageUrl="~/images/print.png"

    OnClientClick ="javascript:CallPrint('ctl00_ContentPlaceHolder1_divprint')" />

    </div>

    3)Server side method

     

     

     

    [system.Web.Services.WebMethod]

    public static void saveImage(string strHtml)

    {

    WebsitesScreenshot.WebsitesScreenshot _WebsitesScreenshot = new WebsitesScreenshot.WebsitesScreenshot();

    WebsitesScreenshot.WebsitesScreenshot.Result _Result;

    _WebsitesScreenshot.ImageHeight = 750;

    _WebsitesScreenshot.TimeOutSeconds = 600;

    _WebsitesScreenshot.ImageWidth = 700;

    _Result = _WebsitesScreenshot.CaptureHTML(strHtml);

    if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Captured)

    {

    _WebsitesScreenshot.SaveImage("E:\\Projects\\IconIntelligent\\IconIntelligent\\abc.jpg");

     

    }

    else if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Failed)

    {

     

    }

    else if (_Result == WebsitesScreenshot.WebsitesScreenshot.Result.Timeout)

    {

     

    }

    _WebsitesScreenshot.Dispose();

    }

     

     

    In this we not taking print just saving a jpg image and getting exception on line-

    _Result = _WebsitesScreenshot.CaptureHTML(strHtml);

    While this is perfectly working in simple html case.so i need a method through which i can take print in any browser.

     

     

    Thanks,

    Suneta Satwani


  4. Hi Rahul,

    Thanks again,Live url is- http://182.71.19.26/icon/analysis.aspx .And code behind is -

     

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Web;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using Business;

    using InfoSoftGlobal;

    using System.Web.UI.HtmlControls;

    public partial class analysis : System.Web.UI.Page

    {

    public string file_name = "";

    clsGraph flash = null;

    List<sp_GetGraphDataResult> list = null;

    protected void Page_Load(object sender, EventArgs e)

    {

     

    loadXml();

    if (!IsPostBack)

    {

     

    GetOperators();

    GetFields();

    GetWells();

    Getyears();

    SetDefaultYear();

    GetValves();

    GetManufecturers();

    litPChartOperator.Text = CreatePChartOperator();

    litPChartInstalltionType.Text = CreatePChartInstallationType();

    litPChartWellFunction.Text = CreatePChartWellFunction();

    litPChartFailureCause.Text = CreatePChartFailureCause();

    litPChartManufacturer.Text = CreatePChartManufacturer();

    litBarChartTimetoFailure.Text = CreateBarChartTimetoFailure();

     

    chkwellsensor.Checked = true;

    divsensor.Visible = false;

    divsensornew.Visible = false;

    divvalve.Visible = false;

    loadXml();

    }

     

    }

     

     

    void SetDefaultYear()

    {

     

     

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

     

    if (chkyears1.Items.Text == "2000" || chkyears1.Items.Text == "2005" || chkyears1.Items.Text == "2008")

    {

    chkyears1.Items.Selected = true;

    }

     

    if (chkyears2.Items.Text == "2000" || chkyears2.Items.Text == "2005" || chkyears2.Items.Text == "2008")

    {

    chkyears2.Items.Selected = true;

    }

     

     

    }

    }

    public void searchtext()

    {

    string searchtext = "You searched for ";

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    int val1 = Convert.ToInt32(vals[0]);

    int val2 = Convert.ToInt32(vals[1]);

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    int bht1 = Convert.ToInt32(bhts[0]);

    int bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    int bhp1 = Convert.ToInt32(bhps[0]);

    int bhp2 = Convert.ToInt32(bhps[1]);

     

    if (chkvalve.Checked == true)

    {

    searchtext += "Valve <b> where ";

    }

    else if (chkwellsensor.Checked == true)

    {

    searchtext += "Well with Sensors <b> where ";

    }

     

     

     

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

     

    if (chkyears1.Items.Selected)

    {

    if (searchtext.IndexOf("years") < 0)

    searchtext += "years = '" + chkyears1.Items.Text + "' ";

    else

    searchtext += ", '" + chkyears1.Items.Text + "'";

    }

     

    if (chkyears2.Items.Selected)

    {

    if (searchtext.IndexOf("years") < 0)

    searchtext += "years = '" + chkyears2.Items.Text + "' ";

    else

    searchtext += ", '" + chkyears2.Items.Text + "' ";

    }

     

     

    }

     

    searchtext += " and ";

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    {

    if (searchtext.IndexOf("vendors") < 0)

    searchtext += "vendors = '" + chkvendors.Items.Text + "' ";

    else

    searchtext += ", '" + chkvendors.Items.Text + "'";

    }

    }

    searchtext += " and ";

    if (ddlOpGroup.SelectedItem.Value != "0")

    {

    searchtext += "operatorgroup = '" + ddlOpGroup.SelectedItem.Text + "' and ";

    }

    if (ddlOpName.SelectedItem.Value != "0")

    {

    searchtext += "operatorname = '" + ddlOpName.SelectedItem.Text + "' and ";

    }

    if (ddlFieldName.SelectedItem.Value != "0")

    {

    searchtext += "fieldname = '" + ddlFieldName.SelectedItem.Text + "' and ";

    }

    if (ddlWellName.SelectedItem.Value != "0")

    {

    searchtext += "wellname = '" + ddlWellName.SelectedItem.Text + "' and ";

    }

    if (ddlCountry.SelectedItem.Value != "0")

    {

    searchtext += "country = '" + ddlCountry.SelectedItem.Text + "' and ";

    }

    if (ddlInsType.SelectedItem.Value != "0")

    {

    searchtext += "installation type = '" + ddlInsType.SelectedItem.Text + "' and ";

    }

    if (ddlWellFun.SelectedItem.Value != "0")

    {

    searchtext += "well function = '" + ddlWellFun.SelectedItem.Text + "' and ";

    }

    if (ddlWellConfig.SelectedItem.Value != "0")

    {

    searchtext += "well congiguration = '" + ddlWellConfig.SelectedItem.Text + "' and ";

    }

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    searchtext += "valve function ='" + ddlvalvefunction.SelectedItem.Text + "' and ";

    }

    searchtext += "valve status ='" + rblvalvestatus.SelectedItem.Text + "' and ";

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    searchtext += "sensor installation date is from ='" + txtsensorinstallfromdate.Text + "' to '" + txtsensorinstalltodate.Text + "' and ";

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    searchtext += "sensor failure date is from ='" + txtSensorFailureFromDate.Text + "' to '" + txtSensorFailureToDate.Text + "' and ";

    }

    searchtext += "sensor status ='" + rblsensor.SelectedItem.Text + "' and ";

    if (bhp1 != 0 || bhp2 != 0)

    {

    searchtext += "bottom hole pressure from ='" + bhp1 + "' to '" + bhp2 + "' and ";

    }

    if (bht1 != 0 || bht2 != 0)

    {

    searchtext += "bottom hole temp from ='" + bht1 + "' to '" + bht2 + "' and ";

    }

    }

    if (val1 != 0 && val2 != 0)

    {

    searchtext += "temperature ='" + val1 + "' to '" + val2 + "' and ";

    }

    if (searchtext != null && searchtext.Substring(searchtext.Length - 4, 3).ToString() == "and")

    {

    searchtext = searchtext.Remove(searchtext.Length - 4, 3);

    }

    searchtext = searchtext + "</b>";

    lblsearch.Text = searchtext;

    }

     

    void GetValves()

    {

    tblValve field = new tblValve();

     

    //List<tblField> fieldList = field.GetFields().Where(F => F.IsActive == true).ToList();

    ddlvalvefunction.DataSource = field.GetValveFunction().ToList();

    ddlvalvefunction.DataTextField = "ValveFunction";

    ddlvalvefunction.DataValueField = "ValveFunction";

    ddlvalvefunction.DataBind();

    ddlvalvefunction.Items.Insert(0, new ListItem("Select Valve Function", "0"));

     

    }

    #region Data Members

     

    void GetOperators()

    {

    tblOperator op = new tblOperator();

     

    List<tblOperator> opList = op.GetOperators().Where(O => O.IsActive == true).Distinct().ToList();

    List<sp_GetOperatorsNameResult> opListGroup = op.GetOperatorGroup(0, Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked)).ToList();

    ddlOpGroup.DataSource = opListGroup.OrderBy(O => O.OperatorGroup).Distinct();

    ddlOpGroup.DataTextField = "OperatorGroup";

    ddlOpGroup.DataValueField = "OperatorGroup";

    ddlOpGroup.DataBind();

    ddlOpGroup.Items.Insert(0, new ListItem("Select Operator Group", "0"));

     

    List<sp_GetOperatorsNamesResult> opListName = op.GetOperatorName(0, Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked)).ToList();

    ddlOpName.DataSource = opListName.Distinct();

    ddlOpName.DataTextField = "OperatorName";

    ddlOpName.DataValueField = "OperatorID";

    ddlOpName.DataBind();

    ddlOpName.Items.Insert(0, new ListItem("Select Operator Name", "0"));

     

    }

     

    void GetFields()

    {

    tblField field = new tblField();

     

    //List<tblField> fieldList = field.GetFields().Where(F => F.IsActive == true).ToList();

    ddlFieldName.DataSource = field.GetFieldName(0, Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked)).ToList();

    ddlFieldName.DataTextField = "FieldName";

    ddlFieldName.DataValueField = "FieldID";

    ddlFieldName.DataBind();

    ddlFieldName.Items.Insert(0, new ListItem("Select Field Name", "0"));

     

    ddlCountry.DataSource = field.GetCountry(0, Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked)).ToList();

    //ddlCountry.DataSource = fieldList.OrderBy(O => O.Country).Distinct();

    ddlCountry.DataTextField = "Country";

    ddlCountry.DataValueField = "Country";

    ddlCountry.DataBind();

    ddlCountry.Items.Insert(0, new ListItem("Select Country", "0"));

     

     

    }

     

    void GetWells()

    {

    tblWell well = new tblWell();

    List<tblWell> wellList = well.GetWells().Where(W => W.IsActive == true).ToList();

    List<sp_GetWellNameResult> wells = well.GetWells(0, Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked)).ToList();

    ddlWellName.DataSource = wells.OrderBy(W => W.WellName).ToList();

    ddlWellName.DataTextField = "WellName";

    ddlWellName.DataValueField = "WellID";

    ddlWellName.DataBind();

    ddlWellName.Items.Insert(0, new ListItem("Select Well Name", "0"));

     

    ddlInsType.DataSource = well.GetActiveWells(wellList, "InstallationType");

    ddlInsType.DataTextField = "InstallationType";

    ddlInsType.DataValueField = "WellID";

    ddlInsType.DataBind();

    ddlInsType.Items.Insert(0, new ListItem("Select Installation Type", "0"));

     

    ddlWellFun.DataSource = well.GetActiveWells(wellList, "WellFunction");

    ddlWellFun.DataTextField = "WellFunction";

    ddlWellFun.DataValueField = "WellID";

    ddlWellFun.DataBind();

    ddlWellFun.Items.Insert(0, new ListItem("Select Well Function", "0"));

     

    ddlWellConfig.DataSource = well.GetActiveWells(wellList, "WellConfiguration");

    ddlWellConfig.DataTextField = "WellConfiguration";

    ddlWellConfig.DataValueField = "WellID";

    ddlWellConfig.DataBind();

    ddlWellConfig.Items.Insert(0, new ListItem("Select Well Configuration", "0"));

    }

     

    void GetManufecturers()

    {

    tblSensorManufacturer tblsensormanu = new tblSensorManufacturer();

    List<tblSensorManufacturer> List = tblsensormanu.GetAllManufecturer().Distinct().ToList();

    chkvendors.DataSource = List.Select(M => M.Manufacturer).Distinct().ToList();

    chkvendors.DataBind();

    }

     

    void Getyears()

    {

    string[] years1 = new String[6];

    string[] years2 = new String[6];

    for (int i = 0; i < 6; i++)

    {

    years1 = ((System.DateTime.Now.Year) - i).ToString();

    }

    chkyears1.DataSource = years1;

    chkyears1.DataBind();

    for (int j = 0; j < 6; j++)

    {

    years2[j] = ((System.DateTime.Now.Year - 6) - j).ToString();

    }

    chkyears2.DataSource = years2;

    chkyears2.DataBind();

    }

     

    #endregion

     

    protected void ddlOpGroup_OnSelectedIndexChanged(object sender, EventArgs e)

    {

    tblOperator op = new tblOperator();

    List<tblOperator> opList = op.GetOperators().Where(O => O.IsActive == true && O.OperatorGroup == ddlOpGroup.SelectedItem.Text.ToString()).Distinct().ToList();

    ddlOpName.DataSource = opList.OrderBy(O => O.OperatorName);

    ddlOpName.DataTextField = "OperatorName";

    ddlOpName.DataValueField = "OperatorID";

    ddlOpName.DataBind();

    ddlOpName.Items.Insert(0, new ListItem("Select Operator Name", "0"));

     

    }

     

    protected void ddlOpName_OnSelectedIndexChanged(object sender, EventArgs e)

    {

    tblField field = new tblField();

    List<tblField> fieldList = field.GetFields().Where(F => F.IsActive == true && F.OperatorID == Convert.ToInt32(ddlOpName.SelectedItem.Value)).ToList();

    ddlFieldName.DataSource = fieldList.OrderBy(F => F.FieldName);

    ddlFieldName.DataTextField = "FieldName";

    ddlFieldName.DataValueField = "FieldID";

    ddlFieldName.DataBind();

    ddlFieldName.Items.Insert(0, new ListItem("Select Field Name", "0"));

     

    }

     

    protected void ddlFieldName_SelectedIndexChanged(object sender, EventArgs e)

    {

    tblWell well = new tblWell();

    List<tblWell> wellList = well.GetWells().Where(W => W.IsActive == true && W.FieldID == Convert.ToInt32(ddlFieldName.SelectedItem.Value)).ToList();

    ddlWellName.DataSource = wellList.OrderBy(W => W.WellName).ToList();

    ddlWellName.DataTextField = "WellName";

    ddlWellName.DataValueField = "WellID";

    ddlWellName.DataBind();

    ddlWellName.Items.Insert(0, new ListItem("Select Well Name", "0"));

     

     

    tblField field = new tblField();

    List<tblField> fieldList = field.GetFields().Where(F => F.IsActive == true).ToList();

    ddlCountry.DataSource = fieldList.Where(O => O.FieldID == Convert.ToInt32(ddlFieldName.SelectedItem.Value)).OrderBy(O => O.Country).Distinct();

    ddlCountry.DataTextField = "Country";

    ddlCountry.DataValueField = "FieldID";

    ddlCountry.DataBind();

    ddlCountry.Items.Insert(0, new ListItem("Select Country", "0"));

     

    }

     

    protected void ddlWellName_SelectedIndexChanged(object sender, EventArgs e)

    {

    tblWell well = new tblWell();

    List<tblWell> wellList = well.GetWells().Where(W => W.IsActive == true && W.WellID == Convert.ToInt32(ddlWellName.SelectedItem.Value)).ToList();

    ddlInsType.DataSource = well.GetActiveWells(wellList, "InstallationType");

    ddlInsType.DataTextField = "InstallationType";

    ddlInsType.DataValueField = "WellID";

    ddlInsType.DataBind();

    ddlInsType.Items.Insert(0, new ListItem("Select Installation Type", "0"));

     

    ddlWellFun.DataSource = well.GetActiveWells(wellList, "WellFunction");

    ddlWellFun.DataTextField = "WellFunction";

    ddlWellFun.DataValueField = "WellID";

    ddlWellFun.DataBind();

    ddlWellFun.Items.Insert(0, new ListItem("Select Well Function", "0"));

     

    ddlWellConfig.DataSource = well.GetActiveWells(wellList, "WellConfiguration");

    ddlWellConfig.DataTextField = "WellConfiguration";

    ddlWellConfig.DataValueField = "WellID";

    ddlWellConfig.DataBind();

    ddlWellConfig.Items.Insert(0, new ListItem("Select Well Configuration", "0"));

    }

     

     

    protected void chkvalve_CheckedChanged(object sender, EventArgs e)

    {

    if (chkvalve.Checked == true)

    {

    divsensor.Visible = false;

    divsensornew.Visible = false;

    divvalve.Visible = true;

    //chkiwcwell.Checked = false;

    chkwellsensor.Checked = false;

    }

    tblValveManufacturer tblvalvemanu = new tblValveManufacturer();

    List<tblValveManufacturer> List = tblvalvemanu.GetAllManufecturer().Distinct().ToList();

    chkvendors.DataSource = List.Select(M => M.Manufacturer).Distinct().ToList();

    chkvendors.DataBind();

    }

     

    protected void chkwellsensor_CheckedChanged(object sender, EventArgs e)

    {

    if (chkwellsensor.Checked == true)

    {

    divsensor.Visible = true;

    divsensornew.Visible = true;

    divvalve.Visible = false;

    chkvalve.Checked = false;

    //chkiwcwell.Checked = false;

    }

    tblSensorManufacturer tblsensormanu = new tblSensorManufacturer();

    List<tblSensorManufacturer> List = tblsensormanu.GetAllManufecturer().Distinct().ToList();

    chkvendors.DataSource = List.Select(M => M.Manufacturer).Distinct().ToList();

    chkvendors.DataBind();

    }

     

    protected void lnbSeasch_Click(object sender, ImageClickEventArgs e)

    {

     

     

    if (chkwellsensor.Checked)

    divsensornew.Visible = true;

    else

    divsensornew.Visible = false;

     

    chklimit();

    searchtext();

     

    GetOperators();

    GetFields();

    GetWells();

    //GetValves();

    //loadXml();

    litPChartOperator.Text = CreatePChartOperator();

    litPChartInstalltionType.Text = CreatePChartInstallationType();

    litPChartWellFunction.Text = CreatePChartWellFunction();

    litPChartFailureCause.Text = CreatePChartFailureCause();

    litPChartManufacturer.Text = CreatePChartManufacturer();

    litBarChartTimetoFailure.Text = CreateBarChartTimetoFailure();

     

    }

     

    protected void chklimit()

    {

    int totyear = 0;

    String values = "";

    //int totvendor = 0;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    {

    values += chkyears1.Items.Value + ",";

    totyear += 1;

    }

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    {

    values += chkyears2.Items.Value + ",";

    totyear += 1;

    }

    }

    string manufecturer = "";

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    {

    manufecturer += chkvendors.Items.Value + ",";

    totyear += 1;

    }

    }

    if (totyear > 5)

    {

    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Analysis", "alert('You can not select more than 5 data from years and vendors');", true);

    }

    else

    {

    loadXml();

    }

     

    }

     

    protected void loadXml()

    {

     

    flash = new clsGraph();

    string bht = sliderbht.Value.ToString();

    string bhp = sliderbhp.Value.ToString();

    string val = Slider4.Value.ToString();

    string years = "";

    string values = "";

    string installfromdate = "";

    string installtodate = "";

    string failurefromdate = "";

    string failuretodate = "";

    string sstatus = "";

    string vstatus = "";

    string valvefunction = "";

    int totyear = 0;

    //int totvendor = 0;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    {

    values += chkyears1.Items.Value + ",";

    totyear += 1;

    }

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    {

    values += chkyears2.Items.Value + ",";

    totyear += 1;

    }

    }

    string manufecturer = "";

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    {

    manufecturer += chkvendors.Items.Value + ",";

    totyear += 1;

    }

    }

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

    if (divsensor.Visible == true && txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    installfromdate = txtsensorinstallfromdate.Text;

    installtodate = txtsensorinstalltodate.Text;

     

    }

    else if (divsensor.Visible == true && txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failurefromdate = txtSensorFailureFromDate.Text;

    failuretodate = txtSensorFailureToDate.Text;

    }

    if (divvalve.Visible == true && ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text.ToString();

    }

    if (chkwellsensor.Checked == true)

    sstatus = rblsensor.SelectedItem.Value;

    else if (chkvalve.Checked == true)

    vstatus = rblvalvestatus.SelectedItem.Value;

     

     

    //valve,sensor,Years,manufecturer,GroupName,OperatorName,FieldName,WellName,Country,InstallatioType,WellFunction,WellConfiguration,TempratureFrom,TempratureTo,status,bhtFrom,bhtTo,bhpFrom,bhpTo,valvefunct,valvestatus

    if (totyear > 5)

    {

     

    }

    else

    {

    list = flash.GenerateSearchXml(Convert.ToInt32(chkvalve.Checked), Convert.ToInt32(chkwellsensor.Checked), values, manufecturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, val, sstatus, bht, bhp, valvefunction, vstatus);

    }

    }

     

     

     

    protected void lnbUpadteSearch_Click(object sender, ImageClickEventArgs e)

    {

    chklimit();

    litPChartOperator.Text = CreatePChartOperator();

    litPChartInstalltionType.Text = CreatePChartInstallationType();

    litPChartWellFunction.Text = CreatePChartWellFunction();

    litPChartFailureCause.Text = CreatePChartFailureCause();

    litPChartManufacturer.Text = CreatePChartManufacturer();

    litBarChartTimetoFailure.Text = CreateBarChartTimetoFailure();

     

    searchtext();

    imgsummary.Visible = true;

    div_home.Visible = false;

    div_search.Visible = true;

    imgsummary.ImageUrl = "images/tab-datasum-hover.png";

    imghome.ImageUrl = "images/tab-home.png";

    }

     

    protected string CreatePChartOperator()

    {

     

    tblSensor senor = new tblSensor();

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

     

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    float tempraturefrom = float.Parse(vals[0]);

    float tempratureto = float.Parse(vals[1]);

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    float bht1 = Convert.ToInt32(bhts[0]);

    float bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    float bhp1 = Convert.ToInt32(bhps[0]);

    float bhp2 = Convert.ToInt32(bhps[1]);

     

     

    DateTime instdatefrom = Convert.ToDateTime("01/01/1900");

    DateTime instdateto = Convert.ToDateTime("01/01/1900");

    DateTime failuredatefrom = Convert.ToDateTime("01/01/1900");

    DateTime failuredateto = Convert.ToDateTime("01/01/1900");

     

    int issensorfailed = 2;

    int isvalvefailed = 2;

    string valvefunction = string.Empty;

     

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text;

    }

    else

    {

    valvefunction = string.Empty;

    }

    if (rblvalvestatus.SelectedItem.Text == "Yes")

    isvalvefailed = 1;

    else if (rblvalvestatus.SelectedItem.Text == "No")

    isvalvefailed = 0;

    else

    isvalvefailed = 2;

     

     

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    instdatefrom = Convert.ToDateTime(txtsensorinstallfromdate.Text);

    instdateto = Convert.ToDateTime(txtsensorinstalltodate.Text);

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failuredatefrom = Convert.ToDateTime(txtSensorFailureFromDate.Text);

    failuredateto = Convert.ToDateTime(txtSensorFailureToDate.Text);

    }

    if (rblsensor.SelectedItem.Text == "Yes")

    issensorfailed = 1;

    else if (rblsensor.SelectedItem.Text == "No")

    issensorfailed = 0;

    else

    issensorfailed = 2;

     

    }

     

     

     

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    string year = string.Empty;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    year = year + chkyears1.Items.Text + ",";

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    year = year + chkyears2.Items.Text + ",";

    }

    string manufacturer = string.Empty;

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    manufacturer = manufacturer + chkvendors.Items.Text + ",";

    }

     

    List<sp_GetPChartByOperatortResult> list = senor.GetPChartOperator(analysetype, year, manufacturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, issensorfailed, instdatefrom, instdateto, failuredatefrom, failuredateto, bht1, bht2, bhp1, bhp2, isvalvefailed, valvefunction, tempraturefrom, tempratureto).ToList();

     

     

     

     

     

    string strXML;

     

     

    if (imgOperator.ImageUrl == "~/images/icon-graph.png")

    {

     

    strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    }

    else

    {

     

    strXML = "<graph xAxisName='Operators' yAxisName='Number of ' decimalPrecision='0' formatNumberScale='0'>";

     

    }

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value;

    if (imgOperator.ImageUrl != "~/images/icon-graph.png")

    strXML += "' color='008E8E' />";

    else

    strXML += "' />";

    }

     

    strXML += "</graph>";

     

    //Create the chart - Pie 3D Chart with data from strXML

     

    if (imgOperator.ImageUrl == "~/images/icon-graph.png")

    {

    //imgOperator.ImageUrl = "~/images/pie.png";

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_Pie2D.swf", "", strXML, "Operator", "335", "170", false);

     

    }

    else

    {

    //imgOperator.ImageUrl = "~/images/icon-graph.png";

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchartop", "335", "170", false);

     

    }

     

     

    }

     

    protected string CreatePChartInstallationType()

    {

     

    tblSensor senor = new tblSensor();

     

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    float tempraturefrom = float.Parse(vals[0]);

    float tempratureto = float.Parse(vals[1]);

     

     

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    float bht1 = Convert.ToInt32(bhts[0]);

    float bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    float bhp1 = Convert.ToInt32(bhps[0]);

    float bhp2 = Convert.ToInt32(bhps[1]);

     

     

    DateTime instdatefrom = Convert.ToDateTime("01/01/1900");

    DateTime instdateto = Convert.ToDateTime("01/01/1900");

    DateTime failuredatefrom = Convert.ToDateTime("01/01/1900");

    DateTime failuredateto = Convert.ToDateTime("01/01/1900");

     

    int issensorfailed = 2;

    int isvalvefailed = 2;

    string valvefunction = string.Empty;

     

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text;

    }

    else

    {

    valvefunction = string.Empty;

    }

    if (rblvalvestatus.SelectedItem.Text == "Yes")

    isvalvefailed = 1;

    else if (rblvalvestatus.SelectedItem.Text == "No")

    isvalvefailed = 0;

    else

    isvalvefailed = 2;

     

     

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    instdatefrom = Convert.ToDateTime(txtsensorinstallfromdate.Text);

    instdateto = Convert.ToDateTime(txtsensorinstalltodate.Text);

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failuredatefrom = Convert.ToDateTime(txtSensorFailureFromDate.Text);

    failuredateto = Convert.ToDateTime(txtSensorFailureToDate.Text);

    }

    if (rblsensor.SelectedItem.Text == "Yes")

    issensorfailed = 1;

    else if (rblsensor.SelectedItem.Text == "No")

    issensorfailed = 0;

    else

    issensorfailed = 2;

     

    }

     

     

     

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    string year = string.Empty;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    year = year + chkyears1.Items.Text + ",";

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    year = year + chkyears2.Items.Text + ",";

    }

    string manufacturer = string.Empty;

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    manufacturer = manufacturer + chkvendors.Items.Text + ",";

    }

     

     

    List<sp_GetPChartInstallationTypeResult> list = senor.GetPChartInstallationType(analysetype, year, manufacturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, issensorfailed, instdatefrom, instdateto, failuredatefrom, failuredateto, bht1, bht2, bhp1, bhp2, isvalvefailed, valvefunction, tempraturefrom, tempratureto).ToList();

     

    string strXML;

     

    if (imgInstallationtype.ImageUrl == "~/images/icon-graph.png")

    {

     

    strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    }

    else

    {

     

    strXML = "<graph xAxisName='Installation Type' yAxisName='Number of' decimalPrecision='0' formatNumberScale='0'>";

     

    }

    //strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value;

    if (imgInstallationtype.ImageUrl != "~/images/icon-graph.png")

    strXML += "' color='008E8E' />";

    else

    strXML += "' />";

    }

     

    strXML += "</graph>";

    if (imgInstallationtype.ImageUrl == "~/images/icon-graph.png")

    {

     

    //Create the chart - Pie 3D Chart with data from strXML

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_Pie2D.swf", "", strXML, "InstallationType", "335", "170", false);

    }

     

    else

    {

    //imgOperator.ImageUrl = "~/images/icon-graph.png";

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchartop", "335", "170", false);

     

    }

    }

     

     

    protected string CreatePChartWellFunction()

    {

     

    tblSensor senor = new tblSensor();

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    float tempraturefrom = float.Parse(vals[0]);

    float tempratureto = float.Parse(vals[1]);

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    float bht1 = Convert.ToInt32(bhts[0]);

    float bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    float bhp1 = Convert.ToInt32(bhps[0]);

    float bhp2 = Convert.ToInt32(bhps[1]);

     

     

    DateTime instdatefrom = Convert.ToDateTime("01/01/1900");

    DateTime instdateto = Convert.ToDateTime("01/01/1900");

    DateTime failuredatefrom = Convert.ToDateTime("01/01/1900");

    DateTime failuredateto = Convert.ToDateTime("01/01/1900");

     

    int issensorfailed = 2;

    int isvalvefailed = 2;

    string valvefunction = string.Empty;

     

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text;

    }

    else

    {

    valvefunction = string.Empty;

    }

    if (rblvalvestatus.SelectedItem.Text == "Yes")

    isvalvefailed = 1;

    else if (rblvalvestatus.SelectedItem.Text == "No")

    isvalvefailed = 0;

    else

    isvalvefailed = 2;

     

     

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    instdatefrom = Convert.ToDateTime(txtsensorinstallfromdate.Text);

    instdateto = Convert.ToDateTime(txtsensorinstalltodate.Text);

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failuredatefrom = Convert.ToDateTime(txtSensorFailureFromDate.Text);

    failuredateto = Convert.ToDateTime(txtSensorFailureToDate.Text);

    }

    if (rblsensor.SelectedItem.Text == "Yes")

    issensorfailed = 1;

    else if (rblsensor.SelectedItem.Text == "No")

    issensorfailed = 0;

    else

    issensorfailed = 2;

     

    }

     

     

     

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    string year = string.Empty;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    year = year + chkyears1.Items.Text + ",";

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    year = year + chkyears2.Items.Text + ",";

    }

    string manufacturer = string.Empty;

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    manufacturer = manufacturer + chkvendors.Items.Text + ",";

    }

     

    List<sp_GetPChartWellFunctionResult> list = senor.GetPChartWellFunction(analysetype, year, manufacturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, issensorfailed, instdatefrom, instdateto, failuredatefrom, failuredateto, bht1, bht2, bhp1, bhp2, isvalvefailed, valvefunction, tempraturefrom, tempratureto).ToList();

     

    string strXML;

     

    if (imgWellfunction.ImageUrl == "~/images/icon-graph.png")

    {

     

    strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    }

    else

    {

     

    strXML = "<graph xAxisName='Well Function' yAxisName='Number of' decimalPrecision='0' formatNumberScale='0'>";

     

    }

    //strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value;

    if (imgWellfunction.ImageUrl != "~/images/icon-graph.png")

    strXML += "' color='008E8E' />";

    else

    strXML += "' />";

    }

     

    strXML += "</graph>";

     

    if (imgWellfunction.ImageUrl == "~/images/icon-graph.png")

    {

     

    //Create the chart - Pie 3D Chart with data from strXML

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_Pie2D.swf", "", strXML, "WellFunction", "335", "170", false);

     

    }

    else

    {

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchartop", "335", "170", false);

     

    }

    }

     

    protected string CreatePChartFailureCause()

    {

    tblSensor senor = new tblSensor();

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    float tempraturefrom = float.Parse(vals[0]);

    float tempratureto = float.Parse(vals[1]);

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    float bht1 = Convert.ToInt32(bhts[0]);

    float bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    float bhp1 = Convert.ToInt32(bhps[0]);

    float bhp2 = Convert.ToInt32(bhps[1]);

     

     

    DateTime instdatefrom = Convert.ToDateTime("01/01/1900");

    DateTime instdateto = Convert.ToDateTime("01/01/1900");

    DateTime failuredatefrom = Convert.ToDateTime("01/01/1900");

    DateTime failuredateto = Convert.ToDateTime("01/01/1900");

     

    int issensorfailed = 2;

    int isvalvefailed = 2;

    string valvefunction = string.Empty;

     

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text;

    }

    else

    {

    valvefunction = string.Empty;

    }

    if (rblvalvestatus.SelectedItem.Text == "Yes")

    isvalvefailed = 1;

    else if (rblvalvestatus.SelectedItem.Text == "No")

    isvalvefailed = 0;

    else

    isvalvefailed = 2;

     

     

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    instdatefrom = Convert.ToDateTime(txtsensorinstallfromdate.Text);

    instdateto = Convert.ToDateTime(txtsensorinstalltodate.Text);

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failuredatefrom = Convert.ToDateTime(txtSensorFailureFromDate.Text);

    failuredateto = Convert.ToDateTime(txtSensorFailureToDate.Text);

    }

    if (rblsensor.SelectedItem.Text == "Yes")

    issensorfailed = 1;

    else if (rblsensor.SelectedItem.Text == "No")

    issensorfailed = 0;

    else

    issensorfailed = 2;

     

    }

     

     

     

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    string year = string.Empty;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    year = year + chkyears1.Items.Text + ",";

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    year = year + chkyears2.Items.Text + ",";

    }

    string manufacturer = string.Empty;

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    manufacturer = manufacturer + chkvendors.Items.Text + ",";

    }

     

     

     

    List<sp_GetPChartByFailureCauseResult> list = senor.GetPChartFailureCause(analysetype, year, manufacturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, issensorfailed, instdatefrom, instdateto, failuredatefrom, failuredateto, bht1, bht2, bhp1, bhp2, isvalvefailed, valvefunction, tempraturefrom, tempratureto).ToList();

     

    string strXML;

    if (imgFailurecause.ImageUrl == "~/images/icon-graph.png")

    {

     

    strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    }

    else

    {

     

    strXML = "<graph xAxisName='Failure Cause' yAxisName='Number of' decimalPrecision='0' formatNumberScale='0'>";

     

    }

    // strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value;

    if (imgFailurecause.ImageUrl != "~/images/icon-graph.png")

    strXML += "' color='008E8E' />";

    else

    strXML += "' />";

    }

     

    strXML += "</graph>";

    if (imgFailurecause.ImageUrl == "~/images/icon-graph.png")

    {

     

    //Create the chart - Pie 3D Chart with data from strXML

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_Pie2D.swf", "", strXML, "FailureCause", "335", "170", false);

     

    }

    else

    {

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchartop", "335", "170", false);

     

    }

     

     

    }

     

     

    protected string CreatePChartManufacturer()

    {

    tblSensor senor = new tblSensor();

    string group = ddlOpGroup.SelectedIndex > 0 ? ddlOpGroup.SelectedItem.ToString() : string.Empty;

    string operatorname = ddlOpName.SelectedIndex > 0 ? ddlOpName.SelectedItem.ToString() : string.Empty;

    string fieldname = ddlFieldName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string wellname = ddlWellName.SelectedIndex > 0 ? ddlFieldName.SelectedItem.ToString() : string.Empty;

    string country = ddlCountry.SelectedIndex > 0 ? ddlCountry.SelectedItem.ToString() : string.Empty;

    string installationtype = ddlInsType.SelectedIndex > 0 ? ddlInsType.SelectedItem.ToString() : string.Empty;

    string wellfunction = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    string wellconfiguration = ddlWellConfig.SelectedIndex > 0 ? ddlWellConfig.SelectedItem.ToString() : string.Empty;

    string[] vals = Slider4.Value.Split(new Char[] { ';' });

     

    float tempraturefrom = float.Parse(vals[0]);

    float tempratureto = float.Parse(vals[1]);

     

    string[] bhts = sliderbht.Value.Split(new Char[] { ';' });

     

    float bht1 = Convert.ToInt32(bhts[0]);

    float bht2 = Convert.ToInt32(bhts[1]);

     

    string[] bhps = sliderbhp.Value.Split(new Char[] { ';' });

     

    float bhp1 = Convert.ToInt32(bhps[0]);

    float bhp2 = Convert.ToInt32(bhps[1]);

     

     

    DateTime instdatefrom = Convert.ToDateTime("01/01/1900");

    DateTime instdateto = Convert.ToDateTime("01/01/1900");

    DateTime failuredatefrom = Convert.ToDateTime("01/01/1900");

    DateTime failuredateto = Convert.ToDateTime("01/01/1900");

     

    int issensorfailed = 2;

    int isvalvefailed = 2;

    string valvefunction = string.Empty;

     

     

    if (divvalve.Visible == true)

    {

    if (ddlvalvefunction.SelectedItem.Value != "0")

    {

    valvefunction = ddlvalvefunction.SelectedItem.Text;

    }

    else

    {

    valvefunction = string.Empty;

    }

    if (rblvalvestatus.SelectedItem.Text == "Yes")

    isvalvefailed = 1;

    else if (rblvalvestatus.SelectedItem.Text == "No")

    isvalvefailed = 0;

    else

    isvalvefailed = 2;

     

     

    }

    else if (divsensor.Visible == true && divsensornew.Visible == true)

    {

    if (txtsensorinstallfromdate.Text != "" && txtsensorinstalltodate.Text != "")

    {

    instdatefrom = Convert.ToDateTime(txtsensorinstallfromdate.Text);

    instdateto = Convert.ToDateTime(txtsensorinstalltodate.Text);

    }

    if (txtSensorFailureFromDate.Text != "" && txtSensorFailureToDate.Text != "")

    {

    failuredatefrom = Convert.ToDateTime(txtSensorFailureFromDate.Text);

    failuredateto = Convert.ToDateTime(txtSensorFailureToDate.Text);

    }

    if (rblsensor.SelectedItem.Text == "Yes")

    issensorfailed = 1;

    else if (rblsensor.SelectedItem.Text == "No")

    issensorfailed = 0;

    else

    issensorfailed = 2;

     

    }

     

     

     

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    string year = string.Empty;

    for (int i = 0; i < chkyears1.Items.Count; i++)

    {

    if (chkyears1.Items.Selected)

    year = year + chkyears1.Items.Text + ",";

    }

    for (int i = 0; i < chkyears2.Items.Count; i++)

    {

    if (chkyears2.Items.Selected)

    year = year + chkyears2.Items.Text + ",";

    }

    string manufacturer = string.Empty;

    for (int i = 0; i < chkvendors.Items.Count; i++)

    {

    if (chkvendors.Items.Selected)

    manufacturer = manufacturer + chkvendors.Items.Text + ",";

    }

     

     

     

    List<sp_GetPChartByManufacturerResult> list = senor.GetPChartManufacture(analysetype, year, manufacturer, group, operatorname, fieldname, wellname, country, installationtype, wellfunction, wellconfiguration, issensorfailed, instdatefrom, instdateto, failuredatefrom, failuredateto, bht1, bht2, bhp1, bhp2, isvalvefailed, valvefunction, tempraturefrom, tempratureto).ToList();

     

    string strXML;

     

    if (imgVendor.ImageUrl == "~/images/icon-graph.png")

    {

     

    strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='5'>";

     

    }

    else

    {

     

    strXML = "<graph xAxisName='Vendor' yAxisName='Number of' decimalPrecision='0' formatNumberScale='0'>";

     

    }

    //strXML = "<graph decimalPrecision='0' showNames='1' showpercentagevalues='1' showPercentageInLabel='1' pieRadius='35' nameTBDistance='1'>";

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value;

    if (imgVendor.ImageUrl != "~/images/icon-graph.png")

    strXML += "' color='008E8E' />";

    else

    strXML += "' />";

    }

     

    strXML += "</graph>";

    if (imgVendor.ImageUrl == "~/images/icon-graph.png")

    {

     

    //Create the chart - Pie 3D Chart with data from strXML

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_Pie2D.swf", "", strXML, "Manufacturer", "335", "170", false);

    }

    else

    {

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchartop", "335", "170", false);

     

    }

    }

     

     

    protected string CreateBarChartTimetoFailure()

    {

    string analysetype = string.Empty;

    if (chkwellsensor.Checked)

    {

    analysetype = "sensor";

    }

    else

    {

    analysetype = "valve";

    }

    tblSensor senor = new tblSensor();

    // string group = ddlWellFun.SelectedIndex > 0 ? ddlWellFun.SelectedItem.ToString() : string.Empty;

    List<sp_GetBarChartTimetoFailureResult> list = senor.GetBarChartTimetoFailure(analysetype).ToList();

     

    string strXML;

    strXML = "<graph xAxisName='Failed Sensors-Time to Failure' yAxisName='Number of' decimalPrecision='0' formatNumberScale='0'>";

     

    for (int i = 0; i < list.Count; i++)

    {

    strXML += "<set name='" + list.name + "' value='" + list.value + "' color='008E8E' />";

    }

     

    strXML += "</graph>";

     

    //Create the chart - Pie 3D Chart with data from strXML

    return FusionCharts.RenderChartHTML("FusionCharts/FCF_column2D.swf", "", strXML, "Barchart", "335", "170", false);

     

    }

    protected void imghome_OnClick(object sender, ImageClickEventArgs e)

    {

     

    div_search.Visible = false;

    div_home.Visible = true;

    imghome.ImageUrl = "images/tab-home1.png";

    imgsummary.ImageUrl = "images/tab-datasum.png";

    }

    protected void imgsummary_OnClick(object sender, ImageClickEventArgs e)

    {

    searchtext();

    div_home.Visible = false;

    div_search.Visible = true;

    imgsummary.ImageUrl = "images/tab-datasum-hover.png";

    imghome.ImageUrl = "images/tab-home.png";

    }

     

    protected void imgOperator_Click(object sender, ImageClickEventArgs e)

    {

    if (imgOperator.ImageUrl == "~/images/icon-graph.png")

    {

    imgOperator.ImageUrl = "~/images/pie.png";

    }

    else

    {

    imgOperator.ImageUrl = "~/images/icon-graph.png";

    }

     

    litPChartOperator.Text = CreatePChartOperator();

     

     

    }

    protected void imgInstallationtype_Click(object sender, ImageClickEventArgs e)

    {

    if (imgInstallationtype.ImageUrl == "~/images/icon-graph.png")

    {

    imgInstallationtype.ImageUrl = "~/images/pie.png";

    }

    else

    {

    imgInstallationtype.ImageUrl = "~/images/icon-graph.png";

    }

    litPChartInstalltionType.Text = CreatePChartInstallationType();

     

    }

    protected void imgWellfunction_Click(object sender, ImageClickEventArgs e)

    {

    if (imgWellfunction.ImageUrl == "~/images/icon-graph.png")

    {

    imgWellfunction.ImageUrl = "~/images/pie.png";

    }

    else

    {

    imgWellfunction.ImageUrl = "~/images/icon-graph.png";

    }

     

    litPChartWellFunction.Text = CreatePChartWellFunction();

     

    }

    protected void imgVendor_Click(object sender, ImageClickEventArgs e)

    {

    if (imgVendor.ImageUrl == "~/images/icon-graph.png")

    {

    imgVendor.ImageUrl = "~/images/pie.png";

    }

    else

    {

    imgVendor.ImageUrl = "~/images/icon-graph.png";

    }

     

    litPChartManufacturer.Text = CreatePChartManufacturer();

     

    }

    protected void imgFailurecause_Click(object sender, ImageClickEventArgs e)

    {

    if (imgFailurecause.ImageUrl == "~/images/icon-graph.png")

    {

    imgFailurecause.ImageUrl = "~/images/pie.png";

    }

    else

    {

    imgFailurecause.ImageUrl = "~/images/icon-graph.png";

    }

     

    litPChartFailureCause.Text = CreatePChartFailureCause();

     

    }

     

     

    }

     

     

     

    Thanks,

    Suneta


  5. Hi Rahul,

    Thanks for your reply but i am already giving print after all graphs rendering process complete on form and still getting no graph plotted on paper after printing. also it is not even showing preview in IE while in Firefox it is at least showing preview and rendering all graphs in preview window .In IE it is showing that Error In Loading Data in place of graphs....Could you please help me in resolving this issue asap.Its quite urgent,

     

     

    Thanks,

    Suneta


  6. Hi,

     

     

    I am using fusion chart pie graph,bar graph and line for graphical display.The problem is when i print them together on a page all graph refreshes during print and while printing the page comes without graph and other datas come.Is there any other way to call graph in the code-behind c# instead of asp.net....... Could anyone resolve this issue .It is quite urgent..

     

    I also tried to attach my code file here bt it is giving error while uploding that :You aren't permitted to upload this kind of file

    so here is the code attached with print button:-

     

    <%@ Page Title="" Language="C#" MasterPageFile="~/MasterMember.master" AutoEventWireup="true"

    CodeFile="ana.aspx.cs" Inherits="ana" %>

     

    <%@ Register Assembly="RJS.Web.WebControl.PopCalendar.Net.2008" Namespace="RJS.Web.WebControl"

    TagPrefix="rjs" %>

    <%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <style type="text/css">

    #Pie3D

    {

    height: 190px;

    width: 690px;

    }

    </style>

     

     

     

     

    <script language="javascript" type="text/javascript" >

    function CallPrint(strid) {

    var prtContent = document.getElementById(strid);

    var WinPrint = window.open('', '', 'width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes');

    WinPrint.document.write("<head><title>title</title>");

    WinPrint.document.write("<link href='css/style.css' rel='stylesheet' type='text/css' />");

    WinPrint.document.write("</head><body onload=’this.focus(); this.print();’>");

    WinPrint.document.write("<panel>"+prtContent.innerHTML + "</panel></body>");

    WinPrint.document.close();

    WinPrint.focus();

    WinPrint.print();

    WinPrint.close();

    //prtContent.innerHTML = strOldOne;

    }

    </script>

    </asp:Content>

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <link rel="stylesheet" href="./css/jslider.css" type="text/css" />

    <link rel="stylesheet" href="./css/jslider.blue.css" type="text/css" />

    <link rel="stylesheet" href="./css/jslider.plastic.css" type="text/css" />

    <link rel="stylesheet" href="./css/jslider.round.css" type="text/css" />

    <link rel="stylesheet" href="./css/jslider.round.plastic.css" type="text/css" />

     

    <script type="text/javascript" src="./js/jquery-1.4.2.js"></script>

     

    <script type="text/javascript" src="./js/jquery.dependClass.js"></script>

     

    <script type="text/javascript" src="./js/jquery.slider-min.js"></script>

     

    <script type="text/javascript" language="JavaScript" src="./FusionCharts/FusionCharts.js"></script>

     

    <div class="member-hd-bg">

    <div class="member-hd">

    <h3>

    Database Analysis</h3>

    </div>

    <div class="member-links">

    <a href="#">Data Home</a> | <a href="search.aspx">Search</a> | <a href="analysis.aspx">Analyse</a></div>

    </div>

    <div id="content">

    <div class="search-outer">

    <div class="search-hd">

    <div class="search-hd-ttl">

    Analysis</div>

    <div class="search-tabs">

    <div class="home-tab">

    <asp:ImageButton ID="imghome" runat="server" Style="border-style: none;" ImageUrl="images/tab-home-hover.png"

    OnClick="imghome_OnClick" alt="" border="0" /></div>

    <div class="datasum-tab">

    <asp:ImageButton ID="imgsummary" runat="server" Style="border-style: none;" OnClick="imgsummary_OnClick"

    alt="" border="0" Visible="false" />

    </div>

    </div>

    </div>

    <div class="search-content">

    <div class="search-left">

    <div class="search-row">

    Select Dataset to analyse</div>

    <asp:UpdatePanel ID="updatePnl" runat="server" UpdateMode="Conditional">

    <ContentTemplate>

    <div class="search-row2">

    <div class="search-col2">

    <asp:CheckBox ID="chkvalve" runat="server" AutoPostBack="true" OnCheckedChanged="chkvalve_CheckedChanged" />

    </div>

    <div class="search-col">

    Valves data</div>

    </div>

    <div class="search-row2">

    <div class="search-col2">

    <asp:CheckBox ID="chkwellsensor" runat="server" AutoPostBack="true" Checked="true"

    OnCheckedChanged="chkwellsensor_CheckedChanged" />

    </div>

    <div class="search-col">

    Wells with Sensors only</div>

    </div>

    <div class="search-row">

    Select year(s) to analyse</div>

    <div class="search-row2">

    <table>

    <tr>

    <td>

    <asp:CheckBoxList ID="chkyears1" runat="server">

    </asp:CheckBoxList>

    </td>

    <td>

    <asp:CheckBoxList ID="chkyears2" runat="server">

    </asp:CheckBoxList>

    </td>

    </tr>

    </table>

    </div>

    <div class="search-row">

    Select vendor(s) to analyse

    </div>

    <div class="search-row2" style="overflow: auto; overflow-y: scroll; height: 100px !important;">

    <asp:CheckBoxList ID="chkvendors" runat="server">

    </asp:CheckBoxList>

    </div>

    </ContentTemplate>

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="chkvalve" />

    <asp:AsyncPostBackTrigger ControlID="chkwellsensor" />

    </Triggers>

    </asp:UpdatePanel>

    <div class="search-row3 bdr-bot3">

    <asp:ImageButton ID="lnbSeasch" runat="server" Style="border-style: none;" ImageUrl="images/btn-viewpriminaryresult.png"

    OnClick="lnbSeasch_Click"></asp:ImageButton>

    </div>

    <asp:UpdatePanel ID="upresult" runat="server">

    <ContentTemplate>

    <div class="search-row">

    Narrow your search</div>

    <div class="search-row2">

    <div class="search-col">

    Operator Group</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlOpGroup" runat="server" CssClass="input2" AutoPostBack="true"

    OnSelectedIndexChanged="ddlOpGroup_OnSelectedIndexChanged">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Operator Name</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlOpName" runat="server" CssClass="input2" AutoPostBack="true"

    OnSelectedIndexChanged="ddlOpName_OnSelectedIndexChanged">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Field Name</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlFieldName" runat="server" CssClass="input2" AutoPostBack="true"

    OnSelectedIndexChanged="ddlFieldName_SelectedIndexChanged">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Well Name</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlWellName" runat="server" CssClass="input2" AutoPostBack="true"

    OnSelectedIndexChanged="ddlWellName_SelectedIndexChanged">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Country</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlCountry" runat="server" CssClass="input2">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Installation Type</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlInsType" runat="server" class="input2">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Well Function</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlWellFun" runat="server" CssClass="input2">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Well Configuration</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlWellConfig" runat="server" CssClass="input2">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div runat="server" id="divvalve" visible="false">

    <div class="search-row2">

    <div class="search-col">

    Valve Failed</div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:RadioButtonList ID="rblvalvestatus" runat="server" RepeatDirection="Horizontal"

    TextAlign="Left">

    <asp:ListItem Text="Yes" Value="N"></asp:ListItem>

    <asp:ListItem Text="No" Value="Y"></asp:ListItem>

    <asp:ListItem Text="All" Value="A" Selected="True"></asp:ListItem>

    </asp:RadioButtonList>

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Valve Functon</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:DropDownList ID="ddlvalvefunction" runat="server" CssClass="input2">

    </asp:DropDownList>

    </div>

    <div class="search-col2">

    </div>

    </div>

    </div>

    <div runat="server" id="divsensor" visible="false">

    <div>

    <div class="search-row2">

    <div class="search-col">

    Installation Date</div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <div>

    From</div>

    <div>

    <asp:TextBox ID="txtsensorinstallfromdate" runat="server" MaxLength="10" Width="117px"></asp:TextBox>

    <rjs:PopCalendar ID="PopCalendar5" runat="server" TextMessage="" ShowWeekend="True"

    Shadow="True" Separator="/" RequiredDateMessage="Date is required" RequiredDate="false"

    Move="True" InvalidDateMessage="" Format="mm dd yyyy" Fade="0.5" Culture="en-US English (United States)"

    ControlFocusOnError="True" Control="txtsensorinstallfromdate" Buttons="[<][m][y] [>]"

    BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" BackColor="White" KeepInside="False">

    </rjs:PopCalendar>

    </div>

    </div>

    <div class="search-col">

    <div>

    To</div>

    <div>

    <asp:TextBox ID="txtsensorinstalltodate" runat="server" MaxLength="10" Width="117px"></asp:TextBox>

    <rjs:PopCalendar ID="PopCalendar6" runat="server" TextMessage="" ShowWeekend="True"

    Shadow="True" Separator="/" RequiredDateMessage="Date is required" RequiredDate="false"

    Move="True" InvalidDateMessage="" Format="mm dd yyyy" Fade="0.5" Culture="en-US English (United States)"

    ControlFocusOnError="True" Control="txtsensorinstalltodate" Buttons="[<][m][y] [>]"

    BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" BackColor="White" KeepInside="False">

    </rjs:PopCalendar>

    </div>

    </div>

    </div>

    </div>

    <div>

    <div class="search-row2">

    <div class="search-col">

    Failure Date</div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <div>

    From</div>

    <div>

    <asp:TextBox ID="txtSensorFailureFromDate" runat="server" MaxLength="10" Width="117px"></asp:TextBox>

    <rjs:PopCalendar ID="PopCalendar7" runat="server" TextMessage="" ShowWeekend="True"

    Shadow="True" Separator="/" RequiredDateMessage="Date is required" RequiredDate="false"

    Move="True" InvalidDateMessage="" Format="mm dd yyyy" Fade="0.5" Culture="en-US English (United States)"

    ControlFocusOnError="True" Control="txtSensorFailureFromDate" Buttons="[<][m][y] [>]"

    BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" BackColor="White" KeepInside="False">

    </rjs:PopCalendar>

    </div>

    </div>

    <div class="search-col">

    <div>

    To</div>

    <div>

    <asp:TextBox ID="txtSensorFailureToDate" runat="server" MaxLength="10" Width="117px"></asp:TextBox>

    <rjs:PopCalendar ID="PopCalendar8" runat="server" TextMessage="" ShowWeekend="True"

    Shadow="True" Separator="/" RequiredDateMessage="Date is required" RequiredDate="false"

    Move="True" InvalidDateMessage="" Format="mm dd yyyy" Fade="0.5" Culture="en-US English (United States)"

    ControlFocusOnError="True" Control="txtSensorFailureToDate" Buttons="[<][m][y] [>]"

    BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" BackColor="White" KeepInside="False">

    </rjs:PopCalendar>

    </div>

    </div>

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Sensor Failed</div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <asp:RadioButtonList ID="rblsensor" runat="server" RepeatDirection="Horizontal" TextAlign="Left">

    <asp:ListItem Text="Yes" Value="N"></asp:ListItem>

    <asp:ListItem Text="No" Value="Y"></asp:ListItem>

    <asp:ListItem Text="All" Value="A" Selected="True"></asp:ListItem>

    </asp:RadioButtonList>

    </div>

    </div>

    </div>

    </ContentTemplate>

    </asp:UpdatePanel>

    <div id="divsensornew" runat="server" visible="false">

    <div class="search-row2">

    <div class="search-col">

    Bottom Hole Temperature ©</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <input id="sliderbht" type="text" name="area" value="0;0" runat="server" />

     

    <script type="text/javascript" charset="utf-8">

    jQuery("#ctl00_ContentPlaceHolder1_sliderbht").slider({ from: 0, to: 300, limits: false, step: 1, skin: "round_plastic" });

    </script>

     

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Bottom Hole Pressure (psi)</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <input id="sliderbhp" type="text" name="area" value="0;0" runat="server" />

     

    <script type="text/javascript" charset="utf-8">

    jQuery("#ctl00_ContentPlaceHolder1_sliderbhp").slider({ from: 0, to: 30000, limits: false, step: 1, skin: "round_plastic" });

    </script>

     

    </div>

    <div class="search-col2">

    </div>

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    Temperature ©</div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    <input id="Slider4" type="text" name="area" value="0;0" runat="server" />

     

    <script type="text/javascript" charset="utf-8">

    jQuery("#ctl00_ContentPlaceHolder1_Slider4").slider({ from: 0, to: 100, limits: false, step: 1, skin: "round_plastic" });

    </script>

     

    </div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row2">

    <div class="search-col">

    View all parameters in results</div>

    <div class="search-col2">

    </div>

    </div>

    <div class="search-row3">

    <asp:ImageButton ID="lnbUpadteSearch" runat="server" Style="border-style: none;"

    ImageUrl="images/btn-updateresult.png" alt="" border="0" OnClick="lnbUpadteSearch_Click">

    </asp:ImageButton>

    </div>

    </div>

    <div class="search-right">

    <asp:UpdatePanel runat="server" ID="search_text">

    <ContentTemplate>

    <div class="search-right-row" runat="server" id="div_search" visible="false">

    <h2>

    Your search results

    </h2>

    <p style="font-size: 12px;">

    <asp:Label ID="lblsearch" runat="server"></asp:Label>

    <asp:Label ID="lblsearchresult" runat="server"></asp:Label>

    </p>

    </div>

    <div class="search-right-row-analysis" runat="server" id="div_home" visible="true">

    <p>

    <strong>Lorem ipsum dolor</strong></p>

    <p style="font-size: 12px;">

    Lorem ipsum dolor sit amet, sapien ipsum libero temporibus, eleifend sed dignissim

    commodo nam et magna, a amet eleifend posuere ullamcorper. Id nam ut, vivamus mauris,

    consequat odio sem in eget iaculis. Vestibulum quis ac quam nibh, tortor pede pellentesque.</p>

    </div>

    </ContentTemplate>

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="imghome" />

    <asp:AsyncPostBackTrigger ControlID="imgsummary" />

    </Triggers>

    </asp:UpdatePanel>

     

    <div style="width:100% ; height:35px ;float:right;text-align:right; padding:5px 5px 5px 5px;">

     

    <asp:ImageButton ID="imgbtnprint" runat="server" ImageUrl="~/images/print.png"

    OnClientClick ="javascript:CallPrint('ctl00_ContentPlaceHolder1_divprint')" OnClick="btnPrint_Click"/>

    </div>

     

    <div id="divprint" runat="server" >

     

     

    <div class="search-right-bluehd">

    <div class="bluehd-ttl">

    Survival Probability</div>

    </div>

    <div class="search-right-row-graph">

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

    id="Pie3D">

    <param name="movie" value="./FusionCharts/FCF_MSLine.swf" />

    <param name="FlashVars" value="&dataURL=Mysearch.xml&chartWidth=650&chartHeight=240">

    <param name="quality" value="high" />

    <embed src="./FusionCharts/FCF_MSLine.swf" flashvars="&dataURL=Mysearch.xml&chartWidth=650&chartHeight=240"

    quality="high" width="650" height="250" name="Pie3D" type="application/x-shockwave-flash"

    pluginspage="http://www.macromedia.com/go/getflashplayer" />

    </object>

    </div>

     

    <asp:UpdatePanel ID="updatepanel1" runat="server" UpdateMode ="Conditional" >

    <ContentTemplate>

    <div class="search-right-bluehd2">

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Operator</div>

    <div class="blue-ttl-icon">

    <asp:ImageButton ID="imgOperator" runat="server" ImageUrl="~/images/icon-graph.png"

    OnClick="imgOperator_Click" />

    </div>

    </div>

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Installation Type</div>

    <div class="blue-ttl-icon">

    <asp:ImageButton ID="imgInstallationtype" runat="server"

    ImageUrl="~/images/icon-graph.png" onclick="imgInstallationtype_Click"

    />

     

    </div>

    </div>

    </div>

    <div class="analysis_row" runat ="server" id="charts">

    <div id="Div1" class="piechart-box" runat ="server">

    <asp:Literal ID="litPChartOperator" runat="server"></asp:Literal>

    </div>

    <div id="Div2" class="piechart-box" runat ="server">

    <asp:Literal ID="litPChartInstalltionType" runat="server"></asp:Literal>

    </div>

    </div>

    <div class="search-right-bluehd2">

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Well Function</div>

    <div class="blue-ttl-icon">

    <asp:ImageButton ID="imgWellfunction" runat="server"

    ImageUrl="~/images/icon-graph.png" onclick="imgWellfunction_Click"

    />

     

     

    </div>

    </div>

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Vendor</div>

    <div class="blue-ttl-icon">

    <asp:ImageButton ID="imgVendor" runat="server"

    ImageUrl="~/images/icon-graph.png" onclick="imgVendor_Click"

    />

     

     

    </div>

    </div>

    </div>

    <div class="analysis_row bdr-bot3">

    <div id="Div3" class="piechart-box" runat ="server">

    <asp:Literal ID="litPChartWellFunction" runat="server"></asp:Literal>

    </div>

    <div class="piechart-box">

    <asp:Literal ID="litPChartManufacturer" runat="server"></asp:Literal>

    </div>

    </div>

    <div class="search-right-bluehd2">

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Failure Cause</div>

    <div class="blue-ttl-icon">

    <asp:ImageButton ID="imgFailurecause" runat="server"

    ImageUrl="~/images/icon-graph.png" onclick="imgFailurecause_Click"

    />

     

     

    </div>

    </div>

    <div class="blue-ttl bdr-rt2">

    <div class="blue-ttl-txt">

    Distribution by Time to Failure</div>

    <div class="blue-ttl-icon">

    <img src="images/icon-graph.png" alt="" />

     

    </div>

    </div>

    </div>

    <div class="analysis_row bdr-bot3">

    <div class="piechart-box">

    <asp:Literal ID="litPChartFailureCause" runat="server"></asp:Literal>

    </div>

    <div class="piechart-box">

    <asp:Literal ID="litBarChartTimetoFailure" runat="server"></asp:Literal>

    </div>

    </div>

    </ContentTemplate>

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="imgOperator" />

    <asp:AsyncPostBackTrigger ControlID="imgInstallationtype" />

    <asp:AsyncPostBackTrigger ControlID="imgWellfunction" />

    <asp:AsyncPostBackTrigger ControlID="imgVendor" />

    <asp:AsyncPostBackTrigger ControlID="imgFailurecause" />

     

     

     

    </Triggers>

    </asp:UpdatePanel>

     

    </div>

    <asp:Label ID="print" runat ="server" style="display:none"></asp:Label>

    </div>

    </div>

    </div>

    </div>

     

    </asp:Content>

     

     

    Thanks,

    Suneta