public InformationController()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Ejemplo n.º 2
0
        private void loadComboTests()
        {
            //load the test information
            List <Test> testList;

            try
            {
                testList = InformationController.GetPatientTests(this.patientID);
                if (testList.Count > 0)
                {
                    Test test;
                    for (int i = 0; i < testList.Count; i++)
                    {
                        test = testList[i];
                        lstTests.Items.Add(test.TestCode.ToString());
                        lstTests.Items[i].SubItems.Add(test.TestName);
                        lstTests.Items[i].SubItems.Add(test.TestDate);
                        lstTests.Items[i].SubItems.Add(test.ApptID);
                        lstTests.Items[i].SubItems.Add(test.Result);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString());
                this.BeginInvoke(new MethodInvoker(Close));
            }

            lstTests.FullRowSelect = true;
        }
Ejemplo n.º 3
0
        private void loadComboVisits()
        {
            List <Visit> visitList;

            try
            {
                visitList = InformationController.GetPatientVisits(this.patientID);
                if (visitList.Count > 0)
                {
                    Visit visit;
                    for (int i = 0; i < visitList.Count; i++)
                    {
                        visit = visitList[i];
                        lstVisits.Items.Add(visit.VisitID.ToString());
                        lstVisits.Items[i].SubItems.Add(visit.ApptDateTime.ToString());
                        lstVisits.Items[i].SubItems.Add(visit.Symptoms);
                        lstVisits.Items[i].SubItems.Add(visit.DiagnosesName);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString());
                this.BeginInvoke(new MethodInvoker(Close));
            }

            lstVisits.FullRowSelect = true;
        }
Ejemplo n.º 4
0
        private void loadComboAppointments()
        {
            List <Appointment> appointments;

            try
            {
                appointments = InformationController.GetPatientAppointments(this.patientID);
                if (appointments.Count > 0)
                {
                    cboAppointments.DataSource    = appointments;
                    cboAppointments.DisplayMember = "apptDateTime";
                    cboAppointments.ValueMember   = "ApptID";
                    cboAppointments.SelectedIndex = 0;
                }
                else
                {
                    cboAppointments.DataSource = null;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                this.BeginInvoke(new MethodInvoker(Close));
            }
        }
Ejemplo n.º 5
0
 private static async Task MainAsync(string[] args) =>
 await InformationController.FetchSchedulesOnConcurrent()
 .Where(schedule =>
        schedule.Date.Year == 2019 &&
        schedule.Date.DayOfWeek == DayOfWeek.Saturday &&
        (schedule.TimeSlot == TimeSlot.Afternoon || schedule.TimeSlot == TimeSlot.Evening) &&
        schedule.Status == Status.Free)
 .ForEachAsync(schedule => Console.WriteLine(schedule.ToString()));
Ejemplo n.º 6
0
        public void should_get_product_title()
        {
            var informationController = new InformationController();

            string productTitle = informationController.GetProductTitle();

            Assert.Equal("The Product Title", productTitle);
        }
Ejemplo n.º 7
0
        public void InformationForm()
        {
            // Arrange
            InformationController controller = new InformationController();

            // Act
            ViewResult result = controller.InformationForm() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 使用API Key,实例化APIController
        /// </summary>
        /// <param name="apiKey">API Key</param>
        /// <param name="secretKey">Secret Key</param>
        public APIManager(string apiKey, string secretKey)
        {
            APIConfiguration configutaion = ConfigurationController.LoadConfigutaion();

            configutaion.APIKey    = apiKey;
            configutaion.SecretKey = secretKey;
            _httpUtility           = new HttpUtility(configutaion);

            _domainController      = new DomainController(_httpUtility);
            _informationController = new InformationController(_httpUtility);
            _hostController        = new HostController(_httpUtility);
            _recordController      = new RecordController(_httpUtility);
        }
Ejemplo n.º 9
0
        static Program()
        {
            var profile     = new PlayerProfile();
            var stats       = new PlayerStats();
            var gameList    = new List <GameInformation>();
            var gameService = new GameServiceClient();
            var infoService = new InformationServiceClient();
            var state       = new BasicObservable <MatchState>(new MatchState());

            infoController = new InformationController(infoService, profile, stats, gameList);
            gameController = new GameController(gameService, state);

            infoController.GetGameList();
        }
Ejemplo n.º 10
0
    // Start is called before the first frame update
    void Awake()
    {
        if (InformationController.infoController == null)
        {
            InformationController.infoController = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        DontDestroyOnLoad(this.gameObject);

        //Save info for the first iteration in the first room
        combatInfo = new CombatInfo();
    }
Ejemplo n.º 11
0
 private void ModifyPatient_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         this.patient   = InformationController.CurrentPatientInfo(this.patientID);
         txtFName.Text  = this.patient.FName;
         txtLName.Text  = this.patient.LName;
         txtSSN.Text    = this.patient.SSN;
         txtStreet.Text = this.patient.Street;
         txtCity.Text   = this.patient.City;
         txtZip.Text    = this.patient.ZipCode;
         txtState.Text  = this.patient.State;
         txtPhone.Text  = this.patient.PhoneNum;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
         MessageBox.Show("Invalid patient id. " +
                         "Please try searching for the patient again.", "Patient Not Found");
     }
 }
        public void When_Information_Added_Should_Return_True()
        {
            IUnitOfWork          unitOfWork = new UnitOfWork();
            IInformationProvider provider   = new InformationProvider(unitOfWork);
            INFORMATION          info       = new INFORMATION();

            info.ID_NO = "9812135489081";

            InformationController controller = new InformationController(provider);

            PostObject <object> post = new PostObject <object>();

            post.Data = JsonConvert.SerializeObject(info);

            var res = controller.SaveInformation(post);

            Assert.IsNotNull(res);

            //   var result = provider.AddInformation(info);

            // Assert.IsNotNull(result.Success);
        }
Ejemplo n.º 13
0
        public void SendEmail()
        {
            // Arrange
            InformationController controller = new InformationController();
            //e-mail sample data
            string name     = "Andres";
            string lastName = "Pereira";
            string company  = "ULACIT";
            string receiver = "*****@*****.**";
            string phone    = "12345678";
            string service1 = "service-test-1";
            string service2 = "service-test-2";
            string service3 = "service-test-3";
            string service4 = "service-test-4";
            string subject  = "test";
            string message  = "testing";

            // Act
            ViewResult result = controller.SendEmail(name, lastName, company, receiver, phone, service1, service2,
                                                     service3, service4, subject, message) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 14
0
 private void PatientInfo_Load(object sender, EventArgs e)
 {
     try
     {
         this.patient   = InformationController.CurrentPatientInfo(this.patientID);
         txtFName.Text  = this.patient.FName;
         txtLName.Text  = this.patient.LName;
         txtSSN.Text    = this.patient.SSN;
         txtStreet.Text = this.patient.Street;
         txtCity.Text   = this.patient.City;
         txtZip.Text    = this.patient.ZipCode;
         txtState.Text  = this.patient.State;
         txtPhone.Text  = this.patient.PhoneNum;
         this.loadComboAppointments();
         this.loadComboTests();
         this.loadComboVisits();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
         MessageBox.Show("Invalid patient id. " +
                         "Please try searching for the patient again.", "Patient Not Found");
     }
 }
Ejemplo n.º 15
0
 private void Start()
 {
     info   = userInterface.GetComponent <InformationController>();
     origin = informationCanvas.transform.position;
 }