コード例 #1
0
        protected void Inquiry(ref JMMMedicalHist objJMMMedicalHist)
        {
            try
            {
                DataSet objDS = null;
                KPITrace.Debug(TraceWeight.Five, "Retrieving Already Booked info b4 usrMain  ");
                usrMedicalMain             usrMedMainObj       = (usrMedicalMain)this.tabMain.Tabs.FindTabFromKey("Main").FindControl("usrMedicalMain1");
                usrDental                  objusrDental        = (usrDental)this.tabMain.FindTabFromKey("Dental").FindControl("UsrDental1");
                usrMedicationHistorySupply objMedHistorySupply = (usrMedicationHistorySupply)this.tabMain.Tabs.FindTabFromKey("MHS").FindControl("usrMedicationHistorySupply");


                usrMedMainObj.Inquiry(ref objJMMMedicalHist);

                if (objJMMMedicalHist != null && objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID > 0)
                {
                    hdnJMMedicalHistID.Value = objJMMMedicalHist.JMMedicalHistID.Value.ToString();
                    NameCtrl obj = (NameCtrl)HeaderCtrl.FindControl("nmInmateName");
                    obj.KPISecurity = "N";


                    ShowHideTabs(true);
                    objDS = new JmmMedicalHistBL().GetMedicalTabColor(ref objJMMMedicalHist);
                }
                objusrDental.LoadData(ref objJMMMedicalHist);

                objMedHistorySupply.Inquiry(ref objJMMMedicalHist);


                #region Tab Color checking
                if (objDS != null && objDS.Tables[0].Rows.Count > 0)
                {
                    if (objDS.Tables[0].Rows[0][0].ToString() != "0")
                    {
                        tabMain.Tabs.FindTabFromKey("MedicalAllergy").TabCssClasses.TextCssClass = "TabRed";
                    }
                    else
                    {
                        tabMain.Tabs.FindTabFromKey("MedicalAllergy").TabCssClasses.TextCssClass = "TabBlack";
                    }
                }
                else
                {
                    tabMain.Tabs.FindTabFromKey("MedicalAllergy").TabCssClasses.TextCssClass = "TabBlack";
                }

                #endregion
                WrtActivityLog(Convert.ToInt64(hdnNameID.Value), "Retrieving Medical History info from DB", "INQ");
            }
            catch (Exception objError)
            {
                ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
            }
        }
コード例 #2
0
        protected JMMMedicalHist ReadScr()
        {
            JMMMedicalHist objJMMMedicalHist = null;

            try
            {
                if (ValidateScr())
                {
                    long NameID = KPIHlp.CVI64(hdnNameID.Value);
                    objJMMMedicalHist             = new JMMMedicalHist();
                    objJMMMedicalHist.JurisID     = GetPageJuris();
                    objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value);
                    objJMMMedicalHist.NameID      = KPIHlp.CVI64(hdnNameID.Value);
                    if (KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue)
                    {
                        objJMMMedicalHist.JMMedicalHistID = KPICounter.GetCounterID(objJMMMedicalHist.JurisID.Value);
                    }
                    else
                    {
                        objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value);
                    }
                    usrMedicalMain usrMedMainObj = (usrMedicalMain)this.tabMain.Tabs.FindTabFromKey("Main").FindControl("usrMedicalMain1");
                    usrMedMainObj.ReadScr(ref objJMMMedicalHist);

                    usrDental objusrDental = (usrDental)this.tabMain.Tabs.FindTabFromKey("Dental").FindControl("UsrDental1");
                    objusrDental.ReadScr(ref objJMMMedicalHist);


                    usrMedicationHistorySupply objMedHistorySupply = (usrMedicationHistorySupply)this.tabMain.Tabs.FindTabFromKey("MHS").FindControl("usrMedicationHistorySupply");
                    objMedHistorySupply.ReadScr(ref objJMMMedicalHist);
                }
            }
            catch (Exception objError)
            {
                ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
            }
            return(objJMMMedicalHist);
        }