protected void Page_Load(object sender, EventArgs e) { //if (!Page.IsPostBack) //{ objCommonMethods = new CommonMethods(); objCController = new CController(); objIController = (CController)objCController; objCMWException = new CMWException(); objCommonMethods = new CommonMethods(); objIController.SetFilePath(strProjectDBPath); objPanels = objIController.ReadPanelIds(); WebDataGrid1.DataSource = GetDataTable(); if (!Page.IsPostBack) { WebDataGrid1.DataSource = GetDataTable(); //this.WebDataGrid1.DataSourceID = "AccessDataSource1"; } else { WebDataGrid1.DataSource = ""; //this.WebDataGrid1.DataSourceID = ""; WebDataGrid1.StyleSetName = this.DDList1.SelectedValue; WebDataGrid1.DataSource = GetDataTable(); //this.WebDataGrid1.DataSourceID = "AccessDataSource1"; } //} // WebProgressBar1.Value = intProgress; if (intProgress <= 100) { WebProgressBar1.Value = intProgress; } }
protected void btnDownload_Click(object sender, System.EventArgs e) { Timer1.Enabled = true; //Label1.Text = "Refreshed at " + //DateTime.Now.ToString(); bool blnServiceStarted; bool blnNoError; try { objCommonMethods = new CommonMethods(); objCController = new CController(); objIController = (CController)objCController; objCMWException = new CMWException(); objCommonMethods = new CommonMethods(); objIController.SetFilePath(strProjectDBPath); Shared.udtNetworkType = objIController.GetNetworkType(strProjectDBPath); ResgistrySettings RegSettings; RegSettings = objIController.GetRegistrySettings(); Shared.ProjectDBPath = strProjectDBPath; Shared.ApplicationPath = RegSettings.InstallationPath; objDownloadSettings = new DownloadSettings(); //start downloader Service blnServiceStarted = objCommonMethods.StartDownloaderService(); //Communication Type objDownloadSettings.TCP = true; objDownloadSettings.ipAddress = "159.99.185.100"; //Port number objDownloadSettings.portNumber = Constants.portNumber; //Gateway type objDownloadSettings.enumDownloadGateway = GateWay.E3NGA; //NetworkType objDownloadSettings.enumNetworkType = Shared.udtNetworkType; //Node type objDownloadSettings.enumBoardTypeID = BoardTypeID.ILI_S_E3; //Node Number objDownloadSettings.NodeNumber = 2; //Firmware path objDownloadSettings.FirmwarePath = ""; //7100 network card objDownloadSettings.Do7100CardDownload = false; //RPT card objDownloadSettings.DoRPTDownload = false; //LCD-SLP load objDownloadSettings.DoLCDSLPDownload = false; //LCD-SLP Graphics objDownloadSettings.DoLCDSLPGraphicsDownload = false; //Project Path objDownloadSettings.ProjectPath = Shared.ProjectDBPath; //Level 4 Password objDownloadSettings.L4Password = "******"; //Download Type objDownloadSettings.DownloadTypes = (int)DownloadTypes.CAMOnly | (int)DownloadTypes.ConfigOnly | (int)DownloadTypes.LabelsOnly; //Installer ID objDownloadSettings.InstallerID = "1234"; //Virtual Switch objDownloadSettings.LoadVirtualSwitch = false; //Site Specific key objDownloadSettings.SiteSpecificKey = 1234; //Application path objDownloadSettings.ApplicationPath = Shared.ApplicationPath; OnCommandCompleted = new DelegateCommandCompleted(Query_OnCommandCompleted); objCallback = new CallbackClass(); objCallback.OnHostToClient += new RemoteCallback(Status_Changed); //call back delegate RemoteCallback wire = new RemoteCallback(objCallback.HandleToClient); //Parameters to be passed between the client and CAMWorksDownloader service. CallbackEventArgs objCallBckArgs = new CallbackEventArgs(); objCallBckArgs.CallBack = wire; objCallBckArgs.IsError = false; objCallBckArgs.Finished = false; objCallBckArgs.CommandId = CommandName.ConfigDownload; objCallBckArgs.State = 0; objCallBckArgs.Sender = GetType().ToString(); objCallBckArgs.Parameters = objDownloadSettings; blnNoError = objIController.DownloadConfigData(objCallBckArgs); if (!blnNoError) { arListStatus.Add(objCMWException.GetExceptions(objCMWException.LastException, "")); // IsDownloadSuucessful = false; OnCommandCompleted(); } //objCMWException = null; objCallBckArgs = null; objDownloadSettings = null; } catch (Exception Ex) { } }
protected void Page_Load(object sender, EventArgs e) { //if (!Page.IsPostBack) //{ objCommonMethods = new CommonMethods(); objCController = new CController(); objIController = (CController)objCController; objCMWException = new CMWException(); objCommonMethods = new CommonMethods(); objIController.SetFilePath(strProjectDBPath); objPanels = objIController.ReadPanelIds(); WebDataGrid1.DataSource = GetDataTable(); if (!Page.IsPostBack) { WebDataGrid1.DataSource = GetDataTable(); //this.WebDataGrid1.DataSourceID = "AccessDataSource1"; } else { WebDataGrid1.DataSource = ""; //this.WebDataGrid1.DataSourceID = ""; WebDataGrid1.StyleSetName = this.DDList1.SelectedValue; WebDataGrid1.DataSource = GetDataTable(); //this.WebDataGrid1.DataSourceID = "AccessDataSource1"; } //} // WebProgressBar1.Value = intProgress; if (intProgress <= 100) WebProgressBar1.Value = intProgress; }