Esempio n. 1
0
        protected void PrintDoctorInquiry()
        {
            try
            {
                JmsDoctor objJmsDoctor = new JmsDoctor();
                objJmsDoctor.DoctorName = KPIHlp.CVS(txtName.Text);
                objJmsDoctor.Location   = KPIHlp.CVS(txtLocation.Text);

                if (chkIsActive.Checked == true)
                {
                    objJmsDoctor.IsActive = 0;
                }
                else
                {
                    objJmsDoctor.IsActive = 1;
                }

                objJmsDoctor.DoctorName = KPIHlp.CVS(txtName.Text);
                objJmsDoctor.Location   = KPIHlp.CVS(txtLocation.Text);
                objJmsDoctor.JurisID    = lstJuris.JurisID;

                JmsDoctorBL objJmsDoctorBL = new JmsDoctorBL();

                objJmsDoctorBL.DoctorPrintSearch(objJmsDoctor);
                WrtActivityLog(long.MinValue, "DoctorSearch Print", "PRT");
                // 66954
                State.PageSelectedSubAgency = -1;
                //
                PrintReport();
            }
            catch (Exception objErr)
            {
                ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr);
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                AddClientOnLoadScript("UpdateClock()");

                hdnMode.Value            = UIMode.ADD.ToString();
                hdnJurisId.Value         = KPIHlp.CVS(GetPageJuris());
                dttmMedicationDate.Value = DateTime.Today;

                if (!String.IsNullOrWhiteSpace(hdnAutoLoad.Value))
                {
                    switch (hdnAutoLoad.Value)
                    {
                    case "ENTERKEY":
                        GetData(false);
                        break;

                    case "ClearGrid":
                        GetData(false);
                        break;
                    }
                    hdnAutoLoad.Value = string.Empty;
                }
            }
            catch (Exception objError)
            {
                ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Put user code to initialize the page here
            if (!State.gMultiJuris)
            {
                lstJuris.Visible = false;
                lblJuris.Visible = false;
                tdlblJuris.Style.Add("display", "none");
                tdlstJuris.Style.Add("display", "none");
            }
            else
            {
                tdlblJuris.Style.Add("display", "");
                tdlstJuris.Style.Add("display", "");
            }

            hdnJurisId.Value = ((HtmlInputHidden)this.Page.FindControl("hdnJurisId")).Value;

            if (lstJuris.JurisID > 0)
            {
                hdnJurisId.Value = KPIHlp.CVS(lstJuris.JurisID);
            }
            if (!IsPostBack)
            {
                if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) != "1")
                {
                    lblsubagency.Visible = false;
                    cddSubAgency.Visible = false;
                }
                else
                {
                    LoadSubAgency();
                }
            }
        }
Esempio n. 4
0
        protected void LoadData()
        {
            try
            {
                string strhdnMode = UIMode.ADD.ToString();
                try
                {
                    strhdnMode = Request.QueryString.Get("hdnMode").Trim();
                }
                catch (Exception) { }

                if (strhdnMode == UIMode.CHG.ToString() || strhdnMode == UIMode.INQ.ToString()) //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                {
                    hdnDoctorId.Value = Request.QueryString.Get("DoctorID");
                    hdnMode.Value     = strhdnMode; //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                    hdnJurisId.Value  = Request.QueryString.Get("JurisID");
                    int juris = KPIHlp.CVI32(hdnJurisId.Value);
                    lstJuris.SetJurisValue(juris);
                    Inquiry(KPIHlp.CVI64(hdnDoctorId.Value));
                }
                else
                {
                    hdnJurisId.Value = KPIHlp.CVS(GetPageJuris());
                    int juris = KPIHlp.CVI32(hdnJurisId.Value);
                    lstJuris.SetJurisValue(juris);

                    hdnMode.Value = UIMode.ADD.ToString();
                }
            }
            catch (Exception objErr)
            {
                throw objErr;
            }
        }
Esempio n. 5
0
        private bool Save()
        {
            try
            {
                JmsDoctor objJmsDoctor = ReadScr();

                JmsDoctorBL objJmsDoctorBL = new JmsDoctorBL();
                if (hdnMode.Value == UIMode.ADD.ToString())
                {
                    objJmsDoctorBL.Insert(objJmsDoctor);
                    ShowMsg(MsgType.Success, FrwkMsg.ADD_SUCCESS);
                    hdnMode.Value     = UIMode.CHG.ToString();
                    hdnDoctorId.Value = KPIHlp.CVS(objJmsDoctor.DoctorID);
                }
                else
                {
                    objJmsDoctor.DoctorID = KPIHlp.CVI64(hdnDoctorId.Value);
                    objJmsDoctorBL.Update(objJmsDoctor);
                    ShowMsg(MsgType.Success, FrwkMsg.UPD_SUCCESS);
                    hdnMode.Value = UIMode.CHG.ToString();
                }
                //Updating the parent

                Inquiry(objJmsDoctor.DoctorID);
                AutoUpdateParent();

                return(true);
            }
            catch (Exception objErr)
            {
                throw objErr;
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                cmdAdd.Attributes.Add("OnClick", "return fn_ManipulateAllergy();");
                cmdClear.Attributes.Add("OnClick", "return fn_CancelAllergyDetails();");
                cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';");
                cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';");
                Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();");
                chkInactive.Attributes.Add("onclick", "return fn_Inactive();");
                AddClientOnLoadScript("fn_Inactive();");
                hdnJurisId.Value   = Request.QueryString.Get("hdnJurisID") == null ? string.Empty : Request.QueryString.Get("hdnJurisID").Trim().ToString();
                hdnBookingID.Value = Request.QueryString.Get("BookingID") == null ? string.Empty : Request.QueryString.Get("BookingID").ToString();
                if (Request.QueryString.Get("Mode") != null && Request.QueryString.Get("Mode") != string.Empty) //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                {
                    hdnMode.Value = Request.QueryString.Get("Mode").ToString();
                }
                if (!IsPostBack)
                {
                    BoundCheckBoxField ChkColumn = (BoundCheckBoxField)this.grdAllergy.Columns.FromKey("Isactive");
                    ChkColumn.ValueConverter = new BoolConverter();


                    JMMAllergy objJMMAllergy = new JMMAllergy();
                    if (!String.IsNullOrEmpty(hdnJurisId.Value))
                    {
                        objJMMAllergy.JurisID = KPIHlp.CVI32(hdnJurisId.Value);
                    }
                    if (!String.IsNullOrEmpty(hdnBookingID.Value))
                    {
                        objJMMAllergy.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value);
                        Inquiry(ref objJMMAllergy);
                    }
                }



                if (KPIHlp.CVI32(hdnJurisId.Value) > 0)
                {
                    hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value));
                }

                if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID))
                {
                    hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID);
                    hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID);
                    hdnLoginPFID.Value   = State.sPFID.ToString();
                }
            }
            catch (Exception)
            {
                KPITrace.Debug(TraceWeight.Five, "Calling page load for medical Allergy screen");
                WrtActivityLog(long.MinValue, " Calling page load for medical Allergy screen.");
            }
        }
Esempio n. 7
0
 public void SetDefaultState()
 {
     if (State.GPV((int)GeoParams.DefaultState, ((BasePage)this.Page).GetPageJuris()) != string.Empty)
     {
         string strState = KPIHlp.CVS(State.GPV((int)GeoParams.DefaultState, ((BasePage)this.Page).GetPageJuris()));
         if (strState != string.Empty)
         {
             cddDLState.Coded = strState;
             //cddBirthState.Coded = strState;
         }
     }
 }
Esempio n. 8
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (!State.gMultiJuris)
            {
                lstJuris.Visible = false;
                lblJuris.Visible = false;
                tdlblJuris.Style.Add("display", "none");
                tdlstJuris.Style.Add("display", "none");
            }
            else
            {
                tdlblJuris.Style.Add("display", "");
                tdlstJuris.Style.Add("display", "");
            }



            hdnJurisId.Value = ((HtmlInputHidden)this.Page.FindControl("hdnJurisId")).Value;


            imgClear.Attributes.Add("onclick", "return fn_Clear();");
            if (lstJuris.JurisID > 0)
            {
                hdnJurisId.Value = KPIHlp.CVS(lstJuris.JurisID);
            }

            if (!IsPostBack)
            {
                dttmToDate.DateValue = DateTime.Now;
                int Days = 1;

                System.TimeSpan tTime = new TimeSpan(Days, 0, 0, 0);
                DateTime.Now.Subtract(tTime);
                dttmFromDate.DateValue = DateTime.Now.Subtract(tTime);


                if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) != "1")
                {
                    lblsubagency.Visible = false;
                    cddSubAgency.Visible = false;
                }
                else
                {
                    LoadSubAgency();
                }
            }
        }
Esempio n. 9
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            #region Added By Jothiraj for load the grid intially Based on the screen height

            if (!String.IsNullOrEmpty(hdnPageHgt.Value))
            {
                string grdHeight = string.Format("{0}px", KPIHlp.CVI32(hdnPageHgt.Value) - 260);
                if (!string.IsNullOrEmpty(grdHeight))
                {
                    grdHeight = grdHeight.ToLower().Replace("px", string.Empty);

                    grdMedicalHist.Height = System.Web.UI.WebControls.Unit.Pixel(Convert.ToInt32(grdHeight));
                }
            }
            iGrdPageSize = GrdPageSize(this.Page, 260);
            #endregion Added By Jothiraj for load the grid intially Based on the screen height


            hdnJurisId.Value = KPIHlp.CVS(new CMSHlp().GetPageJurisWithUserCtrl(tabMedSrch.FindTabFromKey("BSC").FindControl("UsrMedicalBasicSrch2")));

            if (!Page.IsPostBack)
            {
                DispScr(false);
            }
            else if (hdnAutoLoad.Value == "ENTERKEY" || hdnAutoLoad.Value.ToUpper() == "LOAD")
            {
                DisplayRecard();
                hdnAutoLoad.Value = string.Empty;
            }
            if (pnlSearchResults.Visible == true)
            {
                if (hdnAutoLoad.Value == "BACKSPACE")
                {
                    cmdBkSearch_Click();
                    hdnAutoLoad.Value = "";
                }
            }
            if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) == "1")
            {
                grdMedicalHist.Columns["SubAgencyCode"].Hidden = false;
                hdnSubAgencyParam.Value = "1";
            }
            else
            {
                hdnSubAgencyParam.Value = string.Empty;
            }
        }
Esempio n. 10
0
        private JmsDoctor ReadScr()
        {
            try
            {
                JmsDoctor objJmsDoctor = null;

                objJmsDoctor         = new JmsDoctor();
                objJmsDoctor.JurisID = lstJuris.JurisID;

                objJmsDoctor.DoctorID = KPICounter.GetCounterID(objJmsDoctor.JurisID);

                objJmsDoctor.DoctorName = txtDoctorName.Text;
                objJmsDoctor.Location   = txtadrMainAddress.Text;
                objJmsDoctor.City       = KPIHlp.CVS(custHeaderCSZ.City);
                objJmsDoctor.State      = KPIHlp.CVS(custHeaderCSZ.State);
                objJmsDoctor.Zip        = KPIHlp.CVS(custHeaderCSZ.Zip);

                objJmsDoctor.PhoneNbr  = KPIHlp.CVS(cusHeaderPhone.PhoneNumber);
                objJmsDoctor.PhoneType = KPIHlp.CVS(cusHeaderPhone.PhoneType);
                objJmsDoctor.PhoneID   = KPICounter.GetCounterID(objJmsDoctor.JurisID);
                if (chkDentist.Checked)
                {
                    objJmsDoctor.IsDental = 1;
                }
                else
                {
                    objJmsDoctor.IsDental = 0;
                }

                if (chkInActive.Checked)
                {
                    objJmsDoctor.IsActive     = 0;
                    objJmsDoctor.InActiveDttm = KPIHlp.CVDttm(txtInActive.Text.ToString());
                }
                else
                {
                    objJmsDoctor.IsActive = 1;
                }

                return(objJmsDoctor);
            }
            catch (Exception objErr)
            {
                throw objErr;
            }
        }
Esempio n. 11
0
        protected DataSet GetData(bool blnExcel)
        {
            try
            {
                JmsDoctor objJmsDoctor = new JmsDoctor();
                objJmsDoctor.DoctorName = KPIHlp.CVS(txtName.Text);
                objJmsDoctor.Location   = KPIHlp.CVS(txtLocation.Text);

                if (chkIsActive.Checked == true)
                {
                    objJmsDoctor.IsActive = 0;
                }
                else
                {
                    objJmsDoctor.IsActive = 1;
                }

                objJmsDoctor.DoctorName = KPIHlp.CVS(txtName.Text);
                objJmsDoctor.Location   = KPIHlp.CVS(txtLocation.Text);
                objJmsDoctor.JurisID    = lstJuris.JurisID;

                JmsDoctorBL objJmsDoctorBL = new JmsDoctorBL();
                iGrdPageSize = 23;

                if (!blnExcel)
                {
                    return(objJmsDoctorBL.Search(objJmsDoctor, grdDoctorSrch.KPICurrentGrdPageIndex, iGrdPageSize));
                }
                else
                {
                    return(objJmsDoctorBL.Search(objJmsDoctor, 1, iExcelPageSize));
                }
            }
            catch (Exception objErr)
            {
                throw objErr;
            }
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                cmdAdd.Attributes.Add("OnClick", "return fn_ManiGrdDetails();");
                cmdClear.Attributes.Add("OnClick", "return fn_CancelChartDetailsRow();");

                cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';");
                cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';");

                Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();");

                hdnMode.Value            = Request.QueryString.Get("Mode") == null ? string.Empty : Request.QueryString.Get("Mode").Trim().ToString(); //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                hdnJurisId.Value         = Request.QueryString.Get("hdnJurisID") == null ? string.Empty : Request.QueryString.Get("hdnJurisID").Trim().ToString();
                hdnBookingID.Value       = Request.QueryString.Get("BookingID") == null ? string.Empty : Request.QueryString.Get("BookingID").ToString();
                hdnNameID.Value          = Request.QueryString.Get("InmateNameID") == null ? string.Empty : Request.QueryString.Get("InmateNameID").ToString();
                hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID") == null ? string.Empty : Request.QueryString.Get("JMMedicalHistID").ToString();
                hdnStatus.Value          = Request.QueryString.Get("Status") == null ? string.Empty : Request.QueryString.Get("Status").ToString();

                if (hdnStatus.Value == "1")
                {
                    tdstatusbar.Style.Remove("display");
                }
                else
                {
                    tdstatusbar.Style.Add("display", "none");
                }


                if (!IsPostBack)
                {
                    JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist();
                    if (!String.IsNullOrEmpty(hdnJurisId.Value))
                    {
                        objJMMMedicalHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value);
                    }
                    if (!String.IsNullOrEmpty(hdnBookingID.Value))
                    {
                        objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value);
                    }

                    if (!String.IsNullOrEmpty(hdnNameID.Value))
                    {
                        objJMMMedicalHist.NameID = KPIHlp.CVI64(hdnNameID.Value);
                    }
                    if (!String.IsNullOrEmpty(hdnJMMedicalHistID.Value))
                    {
                        objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value);
                    }
                    Inquiry(ref objJMMMedicalHist);
                }
                if (KPIHlp.CVI32(hdnJurisId.Value) > 0)
                {
                    hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value));
                }

                if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID))
                {
                    hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID);
                    hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID);
                    hdnLoginPFID.Value   = State.sPFID.ToString();
                }
            }
            catch (Exception)
            {
                KPITrace.Debug(TraceWeight.Five, "Calling page load for medical charting screen");
                WrtActivityLog(long.MinValue, " Calling page load for medical charting screen.");
            }
        }
Esempio n. 13
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here

            cmdSaveNClose.Attributes.Add("onclick", "glbCtrlClicked = 'Save';");
            cmdSave.Attributes.Add("onclick", "glbCtrlClicked = 'Save';");
            cmdRefresh.Attributes.Add("onclick", "glbCtrlClicked = 'Refresh';");
            cmdPrint.Attributes.Add("onclick", "glbCtrlClicked = 'Print';");

            Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();");
            if (Request.QueryString.Get("BookingID") != null)
            {
                hdnBookingID.Value = Request.QueryString.Get("BookingID").ToString();
            }
            if (Request.QueryString.Get("JMMedicalHistID") != null)
            {
                hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID").ToString();
            }
            hdnMode.Value      = Request.QueryString.Get("hdnMode") == null ? string.Empty : Request.QueryString.Get("hdnMode").Trim().ToString();
            blnForceModeChange = false;
            if (string.IsNullOrEmpty(hdnJurisId.Value))
            {
                hdnJurisId.Value = Request.QueryString.Get("JurisID") != null && KPIHlp.CVI32(Request.QueryString.Get("JurisID").Trim()) > 0 ? Request.QueryString.Get("JurisID").Trim() : KPIHlp.CVS(GetPageJuris());
            }
            else
            {
                hdnJurisId.Value = KPIHlp.CVS(GetPageJuris());
            }



            if (!IsPostBack)
            {
                LoadData();
            }
            else if (hdnAutoLoad.Value.ToUpper() == "ENTERKEY")
            {
                LoadData();
                hdnAutoLoad.Value = string.Empty;
            }
            if (!hdnSave.Value.Equals("Save"))
            {
                if (HeaderCtrl.KPIInmateNameID != Int64.MinValue)
                {
                    JailQuickMenuCtrl1.Visible = true;
                    NameID = HeaderCtrl.KPIInmateNameID;
                    JailQuickMenuCtrl1.KPIInmateNameID = NameID;
                    hdnNameID.Value          = NameID.ToString();
                    JMBookingID              = HeaderCtrl.KPIID;
                    JailQuickMenuCtrl1.KPIID = JMBookingID;
                    hdnBookingID.Value       = JMBookingID.ToString();
                    if (IsPostBack && hdnSave.Value.ToUpper() != "PRINT" && hdnSave.Value.ToUpper() != "REFRESH" && String.IsNullOrWhiteSpace(hdnAutoLoad.Value))
                    {
                        LoadData();
                    }
                    //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                    if (KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue)
                    {
                        JailQuickMenuCtrl1.Visible = false;
                    }
                }
                else
                {
                    JailQuickMenuCtrl1.Visible = false;
                    HeaderCtrl.KPIInmateNameID = long.MinValue;
                    hdnMode.Value = UIMode.ADD.ToString();
                }
                if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID))
                {
                    hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID);
                    hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID);
                    hdnLoginPFID.Value   = State.sPFID.ToString();
                }
                hdnSave.Value     = string.Empty;
                hdnAutoLoad.Value = string.Empty;
            }
        }
Esempio n. 14
0
        protected void LoadData()
        {
            string         strhdnMode        = hdnMode.Value;//UIMode.ADD.ToString();
            JbmBooking     objJbmBooking     = new JbmBooking();
            JbmBookingBL   objJbmBookingBL   = new JbmBookingBL();
            JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist();

            try
            {
                if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0)
                {
                    HeaderCtrl.KPIID = KPIHlp.CVI64(hdnBookingID.Value);
                    hdnNameID.Value  = KPIHlp.CVS(HeaderCtrl.KPIInmateNameID);
                    hdnSPINNbr.Value = KPIHlp.CVS(HeaderCtrl.SPINNbr);

                    objJbmBooking.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value);
                    objJbmBooking.JurisID     = KPIHlp.CVI32(hdnJurisId.Value);
                }
                if (objJbmBooking.JMBookingID > 0)
                {
                    objJMMMedicalHist = new JmmMedicalHistBL().Select(ref objJbmBooking);

                    if (objJMMMedicalHist != null && objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID.Value > 0)
                    {
                        hdnJMMedicalHistID.Value = objJMMMedicalHist.JMMedicalHistID.Value.ToString();
                        strhdnMode = UIMode.CHG.ToString();
                    }
                    else
                    {
                        hdnJMMedicalHistID.Value = string.Empty;

                        hdnMedHistID.Value  = string.Empty;
                        hdnTabAllergy.Value = string.Empty;
                        //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                        this.tabMain.FindTabFromKey("Charting").Hidden        = true;
                        this.tabMain.FindTabFromKey("MHS").Hidden             = true;
                        this.tabMain.FindTabFromKey("MedicalVital").Hidden    = true;
                        this.tabMain.FindTabFromKey("MedicalAllergy").Hidden  = true;
                        this.tabMain.FindTabFromKey("MedicalDiabetic").Hidden = true;
                        this.tabMain.FindTabFromKey("Scheduled Appts").Hidden = true;
                    }
                }
                else
                {
                    ShowHideTabs(false);
                }


                if (objJMMMedicalHist != null)
                {
                    if (strhdnMode == UIMode.CHG.ToString())
                    {
                        hdnMode.Value = UIMode.CHG.ToString();
                        if (objJMMMedicalHist.JMBookingID > 0)
                        {
                            Inquiry(ref objJMMMedicalHist);
                        }
                    }
                    else if (objJMMMedicalHist.JMBookingID > 0)
                    {
                        Inquiry(ref objJMMMedicalHist);
                    }
                }
                else
                {
                    Inquiry(ref objJMMMedicalHist);
                }
                // Modified by Dhaneswari.S on May 20 CRM# 9620
                if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0)
                {
                    objJbmBooking = objJbmBookingBL.Select(KPIHlp.CVI64(hdnBookingID.Value));
                }

                if (objJbmBooking.BookingStatus == "9" || objJbmBooking.BookingStatus == "8")
                {
                    //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                    if (new RepositoryDB().GetScreenPermission("8551", objJbmBooking.JurisID))
                    {
                        hdnMode.Value = UIMode.CHG.ToString();
                    }
                    else
                    {
                        hdnMode.Value = UIMode.INQ.ToString();
                    }
                }
                blnForceModeChange = true;
            }
            catch (Exception objError)
            {
                ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
            }
        }
Esempio n. 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                hdnJurisId.Value = KPIHlp.CVS(new CMSHlp().GetPageJurisWithUserCtrl(tabSuspSrch.FindTabFromKey("BSC").FindControl("usrMedMarBasicSrch")));
                #region Added By Jothiraj for load the grid intially Based on the screen height

                if (!String.IsNullOrEmpty(hdnPageHgt.Value))
                {
                    string grdHeight = string.Format("{0}px", KPIHlp.CVI32(hdnPageHgt.Value) - 240);
                    grdMarhistory.Style.Add("height", grdHeight);
                }
                iGrdPageSize = GrdPageSize(this.Page, 260);
                #endregion Added By Jothiraj for load the grid intially Based on the screen height



                if (!Page.IsPostBack)
                {
                    DispScr(false);
                }
                else
                {
                    switch (hdnAutoLoad.Value)
                    {
                    case "LOAD":
                        if (pnlSearch.Visible != true)
                        {
                            GetSelectCriteria();
                        }
                        hdnAutoLoad.Value = "";
                        break;

                    case "ENTERKEY":
                        if (pnlSearch.Visible != true)
                        {
                            GetSelectCriteria();
                        }
                        else
                        {
                            cmdSearch();
                        }
                        hdnAutoLoad.Value = "";
                        break;
                    }

                    if (pnlSearchResults.Visible == true)
                    {
                        if (hdnAutoLoad.Value == "BACKSPACE")
                        {
                            cmdBack();
                            hdnAutoLoad.Value = "";
                        }
                    }
                }
                sJurisID = ((BasePage)Page).GetPageJuris();
                if (State.GPV((int)SetupParams.EnableSubAgency, sJurisID) == "1")
                {
                    grdMarhistory.Columns["SubAgencyCode"].Hidden = false;
                    hdnSubAgencyParam.Value = "1";
                }
                else
                {
                    hdnSubAgencyParam.Value = string.Empty;
                }
            }
            catch (Exception objErr)
            {
                ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr);
            }
        }
Esempio n. 16
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                cmdAdd.Attributes.Add("onclick", "return fn_PrescriptionGridManip_Row();");
                cmdClear.Attributes.Add("onclick", "return fn_CancelEditgrdToothRow();");
                cmdSaveNClose.Attributes.Add("onclick", "glbCtrlClicked = 'SaveClose';");
                cmdSave.Attributes.Add("onclick", "glbCtrlClicked = 'Save';");
                Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();");
                cmdEditor.Attributes.Add("OnClick", "return fn_OpenTextEditor();");
                KPIImageButton objDentistIbubble = ((KPI.Global.KPIWebControls.KPIImageButton)(lupAttendingDoctor.FindControl("cmdIncOnAddr")));
                objDentistIbubble.Attributes.Add("onClick", "return fn_DentistEntry();");
                AddClientOnLoadScript("fn_visitDoctorNurse();");
                if (Request.QueryString.Get("hdnJurisId") != null && !String.IsNullOrEmpty(Request.QueryString.Get("hdnJurisId"))) //CRM#65266 All inmate Booking Status should allow to create Medical Entry
                {
                    hdnJurisID.Value = Request.QueryString.Get("hdnJurisId");
                }
                else
                {
                    hdnJurisID.Value = KPIHlp.CVS(GetPageJuris());
                }
                if (Request.QueryString.Get("hdnMode") != null && Request.QueryString.Get("hdnMode") != string.Empty)
                {
                    hdnMode.Value = Request.QueryString.Get("hdnMode").ToString();
                }


                if (!Page.IsPostBack)
                {
                    hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisID.Value));
                }
                if (Request.QueryString.Get("BookingID") != null)
                {
                    hdnBookingID.Value = Request.QueryString.Get("BookingID");
                }



                if (Request.QueryString.Get("JMDentistVisitID") != null && !String.IsNullOrEmpty(Request.QueryString.Get("JMDentistVisitID")))
                {
                    hdnDentVisitID.Value = Request.QueryString.Get("JMDentistVisitID");
                }
                if (State.sJurisID == KPIHlp.CVI32(hdnJurisID.Value))
                {
                    hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID);
                    hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID);
                    hdnLoginPFID.Value   = State.sPFID.ToString();
                }
                if (!Page.IsPostBack)
                {
                    LoadData();
                }

                Infragistics.Web.UI.EditorControls.WebDateTimeEditor WDT = (Infragistics.Web.UI.EditorControls.WebDateTimeEditor)dttmDentalVisitDate.FindControl("Time");
                WDT.ClientEvents.Blur = "KPISetShortTimeHM_VisitedDttm";

                WDT.ClientEvents.ValueChanged = "KPISetShortTimeHM_VisitedDttm";
                WDT.ClientEvents.TextChanged  = "KPISetShortTimeHM_VisitedDttm";

                //hdnMode.Value = hdnMode.Value;
            }
            catch (Exception objErr)
            {
                ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr);
            }
        }