Пример #1
0
        /**
         * ออก VN
         */
        private async void button3_Click(object sender, EventArgs e)
        {
            button3.Enabled = false;
            loadingForm2.Show();
            Console.WriteLine("Button3(ออกvn) was clicked");
            if (appointCount > 1) // ถ้ามีนัด 2แพทย์
            {
                Console.WriteLine("แสดงข้อมูลแพทย์หลายคน");
                FormSelectDr frm = new FormSelectDr();
                frm.appoint    = appoint;
                frm.idcard     = idcard;
                frm.hosPtRight = hosPtRight;
                frm.ShowDialog();
            }
            else // ถ้ามีนัด 1 แพทย์
            {
                Console.WriteLine("กดออก VN แพทย์คนเดียว");
                SaveVn sv           = new SaveVn();
                int    appointRowId = appoint.ToArray()[0].rowId;
                string content      = await Task.Run(() => sv.save(smConfig.createVnUrl, idcard, appointRowId, ptRight));

                if (!String.IsNullOrEmpty(content))
                {
                    responseSaveVn app = JsonConvert.DeserializeObject <responseSaveVn>(content);
                    EpsonSlip      es  = new EpsonSlip();
                    es.printOutSlip(app);
                }
            }
            button3.Enabled = true;
            loadingForm2.Hide();
            this.Close();
        }
Пример #2
0
        public async void sendVNandQueue(int rowId, string doctor)
        {
            Console.WriteLine($"Selected Doctor {rowId}");
            SaveVn sv      = new SaveVn();
            string content = await Task.Run(() => sv.save(smConfig.createVnUrl, idcard, rowId, hosPtRight));

            if (!String.IsNullOrEmpty(content))
            {
                responseSaveVn app = JsonConvert.DeserializeObject <responseSaveVn>(content);
                EpsonSlip      es  = new EpsonSlip();
                es.printOutSlip(app);
                this.Close();
            }
        }
Пример #3
0
        /// <summary>
        /// ออก VN แทนทะเบียนพร้อมกับ ปริ้นสลิป VN + คิว
        /// </summary>
        /// <param name="exType"></param>
        public async void presetVn(string exType)
        {
            Console.WriteLine(exType + " was click");
            SaveVn sv      = new SaveVn();
            string content = await Task.Run(() => sv.save(smConfig.createVnUrl, idcard, appointId, hosPtRight, exType));

            if (!String.IsNullOrEmpty(content))
            {
                responseSaveVn app = JsonConvert.DeserializeObject <responseSaveVn>(content);
                EpsonSlip      es  = new EpsonSlip();
                es.printOutSlip(app);
                this.Close();
            }
        }