Пример #1
0
        public QueueForm()
        {
            //if (Klinik3.Properties.Settings.Default.Server)
            //    new Thread(cs.StartServer).Start();

            InitializeComponent();
            cs = new ClientServer();
            cs.StartClient();
            cs.client.MessageReceived += Client_MessageReceived;
        }
Пример #2
0
        //private void q_drugBindingNavigatorSaveItem_Click(object sender, EventArgs e)


        private void DrugForm_Load(object sender, EventArgs e)
        {
            //eventLogMonitorQ.MachineName = Klinik3.Properties.Settings.Default.HostPCName;

            // TODO: This line of code loads data into the 'klinikDataSet.employerinfo' table. You can move, or remove it, as needed.
            this.employerinfoTableAdapter.Fill(this.klinikDataSet.employerinfo);
            // TODO: This line of code loads data into the 'klinikDataSet.metadata' table. You can move, or remove it, as needed.
            this.metadataTableAdapter.Fill(this.klinikDataSet.metadata);
            // TODO: This line of code loads data into the 'klinikDataSet.treatment_type' table. You can move, or remove it, as needed.
            this.treatment_typeTableAdapter.Fill(this.klinikDataSet.treatment_type);
            // TODO: This line of code loads data into the 'klinikDataSet.treatment_type' table. You can move, or remove it, as needed.
            this.treatment_typeTableAdapter.Fill(this.klinikDataSet.treatment_type);
            // TODO: This line of code loads data into the 'klinikDataSet.drug' table. You can move, or remove it, as needed.
            this.drugTableAdapter.Fill(this.klinikDataSet.drug);
            // TODO: This line of code loads data into the 'klinikDataSet.q_drug' table. You can move, or remove it, as needed.
            //this.q_drugTableAdapter.Fill(this.klinikDataSet.q_drug);

            cs = new ClientServer();
            cs.StartClient();
            cs.client.MessageReceived += Client_MessageReceived;
        }
Пример #3
0
 private void ChargeForm_Load(object sender, EventArgs e)
 {
     showReciept();
     cs = new ClientServer();
     cs.StartClient();
 }
Пример #4
0
        private void TreatmentForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'klinikDataSet.q_documents' table. You can move, or remove it, as needed.
            this.q_documentsTableAdapter.Fill(this.klinikDataSet.q_documents);

            // TODO: This line of code loads data into the 'klinikDataSet.metadata' table. You can move, or remove it, as needed.

            this.metadataTableAdapter.Fill(this.klinikDataSet.metadata);

            //todo:uncomment
            tabControl1.TabPages.Remove(tabPagechg);
            tabControl1.TabPages.Remove(tabPagetreat);


            this.diagnosisTableAdapter.Fill(klinikDataSet.diagnosis);
            // TODO: This line of code loads data into the 'klinikDataSet.patient' table. You can move, or remove it, as needed.
            this.patientTableAdapter.Fill(this.klinikDataSet.patient);

            // TODO: This line of code loads data into the 'klinikDataSet.template' table. You can move, or remove it, as needed.

            // TODO: This line of code loads data into the 'klinikDataSet.q_treatment' table. You can move, or remove it, as needed.
            this.q_treatmentTableAdapter.Fill(this.klinikDataSet.q_treatment);


            // TODO: This line of code loads data into the 'klinikDataSet.drug' table. You can move, or remove it, as needed.
            this.drugTableAdapter.Fill(this.klinikDataSet.drug);
            // TODO: This line of code loads data into the 'klinikDataSet.q_drug' table. You can move, or remove it, as needed.
            this.q_drugTableAdapter.Fill(this.klinikDataSet.q_drug);
            // TODO: This line of code loads data into the 'klinikDataSet.queue' table. You can move, or remove it, as needed.
            this.queueTableAdapter.Fill(this.klinikDataSet.queue);

            this.treatment_typeTableAdapter.Fill(this.klinikDataSet.treatment_type);

            //TODO:remove dummy qid
            //Session.Current_QID = "2";
            q_drugBindingSource.Filter      = "q_id=" + Session.Current_QID + "";
            q_treatmentBindingSource.Filter = "q_id='" + Session.Current_QID + "'";
            diagnosisBindingSource1.Filter  = "q_id='" + Session.Current_QID + "'";

            queueBindingSource.Filter    = "q_id='" + Session.Current_QID + "'";
            patientBindingSource.Filter  = "pat_id='" + ((DataRowView)queueBindingSource.Current)["pat_id"] + "'";
            queueBindingSrcHistry.Filter = "pat_id='" + ((DataRowView)queueBindingSource.Current)["pat_id"] + "' and q_status = '" + QStatus.QueueEnded + "'";
            try
            {
                int days = (int)(DateTime.Now - (DateTime)((DataRowView)patientBindingSource.Current)["pat_dob"]).TotalDays;
                labelage.Text = (days / 365) + " Years " + ((days % 365) / 30 == 0 ? "" : ((days % 365) / 30) + " Months ");
            }
            catch (Exception fexp)
            {
                Console.WriteLine(fexp.ToString());
            }

            var currentq = ((DataRowView)queueBindingSource.Current);

            q_drugBindingSource.AddNew();
            diagnosisBindingSource1.AddNew();

            cs = new ClientServer();
            cs.StartClient();
            cs.client.MessageReceived += Client_MessageReceived;

            //load queue documents
            qdocumentsBindingSource.Filter = "q_id='" + Session.Current_QID + "'";
        }
Пример #5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            checkBoxfilterqtoday.Text = "Q for \r\n" + DateTime.Now.ToShortDateString();
            //if (!(Session.Level == "admin" || Session.Level == "dr"))
            //{
            //    tabControl1.TabPages.Remove(tabPageDocQ);
            //}
            tabControl1.TabPages.Remove(tabPageDocQ);

            radioButton1.Text = Session.Username;
            // TODO: This line of code loads data into the 'klinikDataSet.employerinfo' table. You can move, or remove it, as needed.
            this.employerinfoTableAdapter.Fill(this.klinikDataSet.employerinfo);
            // TODO: This line of code loads data into the 'klinikDataSet.GNDLST' table. You can move, or remove it, as needed.
            this.gNDLSTTableAdapter.Fill(this.klinikDataSet.GNDLST);
            // TODO: This line of code loads data into the 'klinikDataSet.RCLST' table. You can move, or remove it, as needed.
            this.rCLSTTableAdapter.Fill(this.klinikDataSet.RCLST);
            // TODO: This line of code loads data into the 'klinikDataSet.MRTLST' table. You can move, or remove it, as needed.
            this.mRTLSTTableAdapter.Fill(this.klinikDataSet.MRTLST);
            // TODO: This line of code loads data into the 'klinikDataSet.queue' table. You can move, or remove it, as needed.
            queueBindingSource.Filter = "q_status = '" + QStatus.QueueDoctor + "'";
            this.queueTableAdapter.Fill(this.klinikDataSet.queue);



            //patientTableAdapter.Adapter.RowUpdated += new SqlRowUpdatedEventHandler(row_updated) ;
            // TODO: This line of code loads data into the 'klinikDataSet.patient' table. You can move, or remove it, as needed.
            this.patientTableAdapter.Fill(this.klinikDataSet.patient);

            cs = new ClientServer();
            cs.StartClient();
            cs.client.MessageReceived += Client_MessageReceived;

            //update queue
            cs.WriteEntry("queue;updated");

            //timer1.Start();
            //TODO: change value
            //Session.Username = "******";


            //var autocompleterc = new AutoCompleteStringCollection();
            //for (int i = 0; i < rCLSTBindingSource.Count; i++)
            //{
            //    var value = ((DataRowView)rCLSTBindingSource[i])[0].ToString();
            //    autocompleterc.Add(value);
            //}
            //pat_raceTextBox.AutoCompleteCustomSource = autocompleterc;


            using (SqlConnection conn = new SqlConnection(Klinik3.Properties.Settings.Default.klinikConnectionString))
            {
                DataSet        dataset = new DataSet();
                SqlDataAdapter adapter = new SqlDataAdapter();
                adapter.SelectCommand             = new SqlCommand("select * from DRView", conn);
                adapter.SelectCommand.CommandType = CommandType.Text;
                adapter.Fill(dataset);
                for (int i = 0; i < dataset.Tables[0].Rows.Count; i++)
                {
                    var tsmnuitem = new ToolStripMenuItem();
                    tsmnuitem.Text = dataset.Tables[0].Rows[i][0].ToString();
                    assignToolStripMenuItem.DropDownItems.Add(tsmnuitem);
                    tsmnuitem.Click += new EventHandler(tsmnuitem_Click);
                    comboBox1.Items.Add(tsmnuitem.Text);
                    comboBox1.SelectedIndex = i;
                    doc_idComboBox.Items.Add(tsmnuitem.Text);
                    doc_idComboBox.SelectedIndex = i;
                }
            }
        }