Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string SamplePath = WebConfigurationManager.ConnectionStrings["SampleData"].ConnectionString;

        if (Directory.Exists(SamplePath) && ddlSamples.Items.Count == 0)
        {
            string[] Files = Directory.GetFiles(SamplePath);
            foreach (string samplefile in Files)
            {
                string FileName = samplefile.Substring(samplefile.LastIndexOf("\\") + 1);
                this.ddlSamples.Items.Add(FileName);
            }
        }
        if (!Page.IsPostBack)
        {
            ddlModules.Items.Clear();
            try
            {
                COPaWS.COPaWS     ws            = new COPaWS.COPaWS();
                NetworkCredential objCredential = new NetworkCredential(ConfigurationSettings.AppSettings["COPaWSUser"], ConfigurationSettings.AppSettings["COPaWSPassword"]);
                ws.Credentials = objCredential;
                string[] Mods = ws.GetLibraryModules();
                foreach (string mod in Mods)
                {
                    this.ddlModules.Items.Add(mod);
                }
                this.ddlModules.Text = this.ddlModules.Items[0].Text;
            }
            catch (Exception ex)
            {
                this.lbMessage.Text = "Open the COPa Web Service with error. Please contact with COPa Library!";
            }
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string queryShow = Request.QueryString["showInfo"];

        NoInfo = queryShow;

        if (NoInfo == "T")
        { // collapse
            informationShow.Text = @"<div id='helpNote' class='collapse'>";
            informationBtn.Text  = @"<button type='button' class='close button collapsed' data-toggle='collapse' data-target='#helpNote'>&times;</button>";
        }
        else
        {
            informationShow.Text = @"<div id='helpNote' class='collapse in'>";
            informationBtn.Text  = @"<button type='button' class='close button' data-toggle='collapse' data-target='#helpNote'>&times;</button>";
        }

        cbUseDefault.Attributes.Add("onclick", "return cbevent();");
        cbUseURL.Attributes.Add("onclick", "return UsingURL();");
        cbHighResolution.Attributes.Add("onclick", "return HighResolution();");
        string strMsg = Request.QueryString["MSG"];

        if (strMsg != "" && strMsg != null)
        {
            this.lbReportError.Text = "No report availabe for your query!";
        }
        //task ID was not found in the task_seq table
        if (cbUseURL.Checked)
        {
            this.InputFile1.Style.Remove("display");
            this.InputFile1.Style.Add("display", "none");
            this.URLPanel.Style.Remove("display");
            this.URLPanel.Style.Add("display", "block");
            //call url panel and disable file browse panel
        }
        if (!cbUseDefault.Checked)
        {
            this.ParameterPanel.Style.Remove("display");
            this.ParameterPanel.Style.Add("display", "block");
            //call in detailed settings panel
        }

        //btUpload.Attributes.Add("onclick", "return ShowProgress();");
        if (!Page.IsPostBack)
        {
            this.ddlModels.Items.Clear();
            COPaWS.COPaWS     ws            = new COPaWS.COPaWS();
            NetworkCredential objCredential = new NetworkCredential(ConfigurationSettings.AppSettings["COPaWSUser"], ConfigurationSettings.AppSettings["COPaWSPassword"]);
            ws.Credentials = objCredential;
            string[] Mods = ws.GetLibraryModules();
            foreach (string mod in Mods)
            {
                this.ddlModels.Items.Add(mod);
            }
            this.ddlModels.Text = this.ddlModels.Items[0].Text;
            //initializing dropdown menu
        }
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string queryShow = Request.QueryString["showInfo"];
        NoInfo = queryShow;

        if (NoInfo == "T")
        { // collapse
            informationShow.Text = @"<div id='helpNote' class='collapse'>";
            informationBtn.Text = @"<button type='button' class='close button collapsed' data-toggle='collapse' data-target='#helpNote'>&times;</button>";
        }
        else
        {
            informationShow.Text = @"<div id='helpNote' class='collapse in'>";
            informationBtn.Text = @"<button type='button' class='close button' data-toggle='collapse' data-target='#helpNote'>&times;</button>";
        }

        cbUseDefault.Attributes.Add("onclick", "return cbevent();");
        cbUseURL.Attributes.Add("onclick", "return UsingURL();");
        cbHighResolution.Attributes.Add("onclick", "return HighResolution();");
        string strMsg = Request.QueryString["MSG"];
        if (strMsg != "" && strMsg != null)
            this.lbReportError.Text = "No report availabe for your query!";
        //task ID was not found in the task_seq table
        if (cbUseURL.Checked)
        {
            this.InputFile1.Style.Remove("display");
            this.InputFile1.Style.Add("display", "none");
            this.URLPanel.Style.Remove("display");
            this.URLPanel.Style.Add("display", "block");
            //call url panel and disable file browse panel
        }
        if (!cbUseDefault.Checked)
        {
            this.ParameterPanel.Style.Remove("display");
            this.ParameterPanel.Style.Add("display", "block");
            //call in detailed settings panel
        }

        //btUpload.Attributes.Add("onclick", "return ShowProgress();");
        if (!Page.IsPostBack)
        {

            this.ddlModels.Items.Clear();
            COPaWS.COPaWS ws = new COPaWS.COPaWS();
            NetworkCredential objCredential = new NetworkCredential(ConfigurationSettings.AppSettings["COPaWSUser"], ConfigurationSettings.AppSettings["COPaWSPassword"]);
            ws.Credentials = objCredential;
            string[] Mods = ws.GetLibraryModules();
            foreach (string mod in Mods)
            {
                this.ddlModels.Items.Add(mod);
            }
            this.ddlModels.Text = this.ddlModels.Items[0].Text;
            //initializing dropdown menu
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string SamplePath = WebConfigurationManager.ConnectionStrings["SampleData"].ConnectionString;

        if (Directory.Exists(SamplePath) && ddlSamples.Items.Count ==0)
        {
            string[] Files = Directory.GetFiles(SamplePath);
            foreach (string samplefile in Files)
            {
                string FileName = samplefile.Substring(samplefile.LastIndexOf("\\")+1);
                this.ddlSamples.Items.Add(FileName);

            }
        }
        if (!Page.IsPostBack)
        {
            ddlModules.Items.Clear();
            try
            {
                COPaWS.COPaWS ws = new COPaWS.COPaWS();
                NetworkCredential objCredential = new NetworkCredential(ConfigurationSettings.AppSettings["COPaWSUser"], ConfigurationSettings.AppSettings["COPaWSPassword"]);
                ws.Credentials = objCredential;
                string[] Mods = ws.GetLibraryModules();
                foreach (string mod in Mods)
                {
                    this.ddlModules.Items.Add(mod);
                }
                this.ddlModules.Text = this.ddlModules.Items[0].Text;
            }
            catch (Exception ex)
            {
                this.lbMessage.Text = "Open the COPa Web Service with error. Please contact with COPa Library!";
            }
        }
    }