Beispiel #1
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            lblStartTime.Text = DateTime.Now.ToLongTimeString();
            lblStartTime.Update();
            btnProcess.Enabled = false;
            try
            {                
                log.Debug("btnProcess_Click()");

                //Get file type
                ImportBase pdf;
                switch (clbFileType.CheckedIndices[0])
                {
                    case 0:
                        pdf = new ProcessCommunityUpdate(HealthSystemID);                        
                        break;
                    case 1:
                        pdf = new ProcessDiagnosisFile(HealthSystemID);
                        break;
                    case 2:
                        pdf = new ProcessEncounterFile(HealthSystemID);
                        break;
                    case 3:
                        pdf = new ProcessProcedureFile(HealthSystemID);
                        break;
                    case 4:
                        pdf = new ProcessProcedureFile(HealthSystemID);
                        break;
                    default:
                        throw new ApplicationException("No file type chosen");                        
                }

                int FileID = Convert.ToInt32(txtFileID.Text);
                pdf.UpdateProductionData = cbUpdateProduction.Checked;
                pdf.Execute(FileID);
            }
            finally
            {
                btnProcess.Enabled = true;
                this.Cursor = Cursors.Default;
                lblEndTime.Text = DateTime.Now.ToLongTimeString();
            }
        }