Example #1
0
        private void ContextMenu_order_edit(object sender, System.EventArgs e)
        {
            //if (grfQue.Row <= 0) return;
            if (grfQue.Row <= 0)
            {
                return;
            }
            String chk = "", name = "", id = "";
            Cursor curOld;

            curOld      = this.Cursor;
            this.Cursor = Cursors.WaitCursor;
            id          = grfOpera[grfOpera.Row, colQueId] != null ? grfOpera[grfOpera.Row, colQueId].ToString() : "";
            name        = grfOpera[grfOpera.Row, colQueName] != null ? grfOpera[grfOpera.Row, colQueName].ToString() : "";
            //openOrNew(id, "");
            FrmOrAdd frm = new FrmOrAdd(ic, menu, id, "", "", "edit");
            String   txt = "";

            if (!name.Equals(""))
            {
                txt = "ป้อน OR " + name;
            }
            frm.FormBorderStyle = FormBorderStyle.None;
            menu.AddNewTab(frm, txt);
            this.Cursor = curOld;
        }
Example #2
0
        private void openStockRec()
        {
            String      name = "", txt = "";
            FrmStockRec frm = new FrmStockRec(ic, menu, this, "", "");

            if (!name.Equals(""))
            {
                txt = " " + name;
            }

            frm.FormBorderStyle = FormBorderStyle.None;
            C1DockingTabPage tab = menu.AddNewTab(frm, txt);
            //frm.tab = tab;
        }
Example #3
0
        private void openPatientAdd(String pttId, String name)
        {
            FrmPatientAdd frm;

            if (ic.iniC.statusAppDonor.Equals("1"))
            {
                frm = new FrmPatientAdd(ic, pttId, "", "");
            }
            else
            {
                //frm = new FrmPatientAdd(ic,"", pttId,"");     //  -0004
                frm = new FrmPatientAdd(ic, pttId, "", "");     //  +0004
            }
            String txt = "";

            if (!name.Equals(""))
            {
                txt = "ป้อน Patient " + name;
            }
            else
            {
                txt = "ป้อน Patient ใหม่ ";
            }

            frm.FormBorderStyle = FormBorderStyle.None;
            menu.AddNewTab(frm, txt);
        }
Example #4
0
        private void PatientEdit(String pttId, String vsId, String name, String pttOid)
        {
            long idold = 0, idnew = 0, id1 = 0, id2 = 0;

            long.TryParse(pttId, out id1);
            long.TryParse(pttOid, out id2);
            idnew = id1 > id2 ? id1 : id2;
            idold = id1 < id2 ? id2 : id1;

            FrmPatientAdd frm = new FrmPatientAdd(ic, pttId, "", pttOid);
            String        txt = "";

            if (!name.Equals(""))
            {
                txt = "แก้ไข Patient " + name;
            }
            else
            {
                txt = "แก้ไข Patient ใหม่ ";
            }

            //frm.FormBorderStyle = FormBorderStyle.None;
            //frm.ShowDialog(this);
            //chkHn.Checked = false;
            //chkVisit.Checked = true;
            //txtSearch.Value = "";
            //setGrfPtt();

            menu.AddNewTab(frm, txt);
        }
Example #5
0
        private void openDtrAdd(String pttId, String vn, String name)
        {
            FrmDoctorAdd frm = new FrmDoctorAdd(ic, menu, pttId, vn);
            String       txt = "";

            if (!name.Equals(""))
            {
                txt = " " + name;
            }

            frm.FormBorderStyle = FormBorderStyle.None;
            C1DockingTabPage tab = menu.AddNewTab(frm, txt);

            frm.tab = tab;
        }
Example #6
0
        private void openNurseAdd(String pttId, String vsid, String name, String flagview)
        {
            FrmPharmaAdd frm = new FrmPharmaAdd(ic, menu, pttId, vsid, flagview);
            String       txt = "";

            if (!name.Equals(""))
            {
                txt = "Pharmacy " + name;
            }

            frm.FormBorderStyle = FormBorderStyle.None;
            C1DockingTabPage tab = menu.AddNewTab(frm, txt);

            frm.tab         = tab;
            frm.frmPharView = this;
        }
Example #7
0
        private void acceptLabOPUAdd(String reqid, String name, String vn, String dtrid, String remark, String hn, Boolean flagOpen, String dobfemale, String itmcode)
        {
            ic.cStf.staff_id = "";
            FrmPasswordConfirm frm = new FrmPasswordConfirm(ic);

            frm.ShowDialog(this);
            if (!ic.cStf.staff_id.Equals(""))
            {
                lbReq = ic.ivfDB.setLabRequest(name, vn, dtrid, remark, hn, dobfemale, reqid, itmcode, "", "", "", "", "", "");
                String re   = ic.ivfDB.lbReqDB.insertLabRequest(lbReq, "");
                long   chk1 = 0;
                if (long.TryParse(re, out chk1))
                {
                    String re1 = ic.ivfDB.lbReqDB.UpdateStatusRequestAccept(re, ic.cStf.staff_id);
                    String re4 = ic.ivfDB.lbReqDB.UpdateStatusRequestProcess(re, ic.cStf.staff_id);
                    String re2 = ic.ivfDB.lbReqDB.UpdateStatusRequestAcceptOld(reqid, re);
                    if (long.TryParse(re2, out chk1))
                    {
                        //LabOpu opu = new LabOpu();
                        //LabRequest lbreq = new LabRequest();
                        //lbreq = ic.ivfDB.lbReqDB.selectByPk1(reqId);
                        //opu.opu_id = "";
                        //opu.opu_code = ic.ivfDB.copDB.genOPUDoc();
                        //opu.embryo_freez_stage = "";
                        //opu.embryoid_freez_position = "";
                        //opu.hn_male = "";
                        //opu.hn_female = lbreq.hn_female;
                        //opu.name_male = "";
                        //opu.name_female = lbreq.name_female;
                        //opu.remark = "";
                        //opu.dob_female = "";
                        //opu.dob_male = "";
                        //opu.doctor_id = lbreq.doctor_id;
                        //opu.proce_id = "";
                        //opu.opu_date = DateTime.Now.Year.ToString()+"-"+ System.DateTime.Now.ToString("MM-dd");
                        //opu.req_id = reqId;
                        LabOpu opu = ic.ivfDB.setOPU(re);
                        String re3 = ic.ivfDB.opuDB.insert(opu, ic.cStf.staff_id);
                        if (long.TryParse(re3, out chk1))
                        {
                            setGrfReq();
                            if (flagOpen)
                            {
                                if (itmcode.Equals("112"))
                                {
                                    FrmLabOPUAdd2 frm1 = new FrmLabOPUAdd2(ic, "", re3);
                                    String        txt  = "";
                                    if (!name.Equals(""))
                                    {
                                        txt = "ป้อน LAB OPU " + name;
                                    }
                                    else
                                    {
                                        txt = "ป้อน LAB OPU ใหม่ ";
                                    }

                                    frm1.FormBorderStyle = FormBorderStyle.None;
                                    menu.AddNewTab(frm1, txt);
                                }
                                else if (itmcode.Equals("160"))
                                {
                                    FrmLabFetAdd3 frm1 = new FrmLabFetAdd3(ic, "", re3);
                                    String        txt  = "";
                                    if (!name.Equals(""))
                                    {
                                        txt = "ป้อน LAB OPU " + name;
                                    }
                                    else
                                    {
                                        txt = "ป้อน LAB OPU ใหม่ ";
                                    }

                                    frm1.FormBorderStyle = FormBorderStyle.None;
                                    menu.AddNewTab(frm1, txt);
                                }
                            }
                        }
                        else
                        {
                            MessageBox.Show("Error gen OPU", "");
                        }
                    }
                    else
                    {
                        MessageBox.Show("ไม่สามารถ update status accept", "error");
                    }
                }

                //int chk = 0;
            }
        }