Beispiel #1
0
        protected void rgOrdenes_InsertCommand(object sender, GridCommandEventArgs e)
        {
            OrdenesHistoriaBll objBll     = new OrdenesHistoriaBll();
            GridEditableItem   editColumn = (GridEditableItem)e.Item;
            Hashtable          newValues  = new Hashtable();

            e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editColumn);

            OrdenesHistoria objEnt = new OrdenesHistoria();

            objEnt.Descripcion    = newValues["DESCRIPCION"].ToString();
            objEnt.MedicoTratante = newValues["MEDICO_TRATANTE"].ToString();
            objEnt.IdHistoria     = this.IdHist;
            objEnt.IdCreacion     = objEnt.IdUltimaModificacion = this.IdUserCurrent;
            objEnt.FechaCreacion  = objEnt.FechaUltimaModificacion = DateTime.Now;

            if (objBll.Save(objEnt))
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "okOrdSav", "alert('Se ha almacenado la orden correctamente');", true);
            }
            else
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errOrdSav", "alert('Se ha presentado el siguiente error al cargar la nueva orden al sistema\\n\\n" + Utilidades.AjustarMensajeError(objBll.Error) + "');", true);
            }
        }
        protected void btn_actualizar_Click(object sender, EventArgs e)
        {
            prueba1Entities cnx1        = new prueba1Entities();
            proyecto        existe      = new proyecto();
            int             id_proyecto = Convert.ToInt32(Session["ID_PROYECTO"]);

            using (cnx1)

            {
                existe = (from w in cnx1.proyecto
                          where w.Id == id_proyecto
                          select w).FirstOrDefault();

                existe.nombre_proy  = txt_nombre.Text;
                existe.objetivos    = txt_objetivo.Text;
                existe.valor_proy   = Convert.ToDouble(txt_valor.Value);
                existe.id_municipio = Convert.ToInt32(cmb_municipios.SelectedValue);
                cnx1.SaveChanges();
                Session["ID_PROYECTO"] = "";
                string cadena_url = Request.QueryString.ToString();
                string message    = "Proyecto actualizado correctamente";
                string url        = "Modificar_Proyecto.aspx?" + cadena_url;
                string script     = "{ alert('";
                script += message; script += "');"; script += "window.location = '"; script += url; script += "'; }";
                RadScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "alert", script, true);
            }
        }
        protected void rbtnCargarArchivo_Click(object sender, EventArgs e)
        {
            if (this.rauFile.UploadedFiles.Count > 0)
            {
                AnexoHistoriaBll objBll    = new AnexoHistoriaBll();
                AnexoHistoria    objEntity = new AnexoHistoria();
                objEntity.IdHistoria     = this.IdHist;
                objEntity.IdMuestra      = this.IdMuestraRelacionada;
                objEntity.IdTipoRevision = this.TipoRevision;
                objEntity.IdCreacion     = this.IdUserCurrent;
                objEntity.NombreAdjunto  = this.rtxtNameFile.Text.Trim();

                int idTipoEx = 0;

                if (this.IdMuestraRelacionada != int.MinValue)
                {
                    MuestraLaboratorioBll objBllMl = new MuestraLaboratorioBll();
                    MuestraLaboratorio    objEntMl = objBllMl.Load(this.idMuestraRelacionada);
                    idTipoEx = Convert.ToInt32(objEntMl.IdTipoExamen);
                }

                Stream dataFoto = null;
                dataFoto = this.rauFile.UploadedFiles[0].InputStream;

                if (!objBll.GuardarNuevoArchivo(objEntity, dataFoto, this.PathFilesToAttach, this.rauFile.UploadedFiles[0].GetExtension()))
                {
                    RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errSav", "alert('Se presento el siguiente error al cargar el archivo');", true);
                }
                else
                {
                    RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "okSav", "CargarPadre(" + Convert.ToInt32(this.tipoRevision) + ", " + idTipoEx + ");", true);
                }
            }
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void rbtnSolExamen_Click(object sender, EventArgs e)
        {
            MuestraLaboratorioBll objBllHisMed = new MuestraLaboratorioBll();
            ArrayList             idExamenes   = new ArrayList();

            foreach (RadListBoxItem itm in this.lstMuestras.Items)
            {
                if (itm.Checked)
                {
                    idExamenes.Add(itm.Value);
                }
            }

            string medComment = this.rtxtComSolExm.Text.Trim();

            if (idExamenes.Count <= 0)
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errSolMuVal1", "alert('No ha seleccionado el tipo de examen que requiere sea realizado');", true);
                return;
            }

            if (!objBllHisMed.SolicitarMuestrasMedicina(this.IdHist, idExamenes, this.IdUserCurrent, medComment))
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errSolMu", "alert('Se ha presentado un error al procesar la información\\n\\n" + Utilidades.AjustarMensajeError(objBllHisMed.Error) + "');", true);
            }
        }
        protected void rbtnIngresar_Click(object sender, EventArgs e)
        {
            string strUsr = this.rtxtUser.Text.Trim();
            string strPwd = this.rtxtPwd.Text.Trim();

            UsuarioBll objBll = new UsuarioBll();

            if (objBll.ValidateUser(strUsr, strPwd))
            {
                Usuario objEnt = objBll.Load(strUsr);
                if (objEnt.Activo)
                {
                    Session["IdUsCr"]     = objEnt.Id;
                    Session["NamUsrCur"]  = objEnt.Nombres + " " + objEnt.Apellidos;
                    Session["idPerfCurr"] = objEnt.Perfil;
                    Session["FinHisMed"]  = objEnt.FinalizaHistoria;
                    Session["isAdmin"]    = objEnt.Administrador;
                    Response.Redirect(ResolveUrl("~/Inicio.aspx"), true);
                }
                else
                {
                    RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "alert('El usuario no es un usuario valido');", true);
                }
            }
            else
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Error", "alert('Se ha presentado el siguiente Error:\\n\\n" + objBll.Error + "');", true);
            }
        }
        protected void btnGoToImmun_Click(object sender, EventArgs e)
        {
            Session["FormIsLoaded"] = null;

            Session["CurrentFormName"] = "frmImmunisationTouch";
            Session["IsFirstLoad"]     = "true";
            //phForms.Controls.Clear();
            //phForms.EnableViewState = true;
            Touch.Custom_Forms.frmImmunisationTouch fr = (frmImmunisationTouch)Page.LoadControl("frmImmunisationTouch.ascx");
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            foreach (Control item in phForms.Controls)
            {
                phForms.Controls.Remove(item);
                //item.Visible = false;
            }
            frmImmunisationTouch theFrm = (frmImmunisationTouch)phForms.FindControl("ID" + Session["CurrentFormName"].ToString());

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                phForms.Controls.Add(fr);
            }

            phForms.DataBind();
            updtForms.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "settabs", "setTabs();", true);
        }
Beispiel #7
0
        protected void btnClose_Click(object sender, EventArgs e)
        {
            TemperatureModal            = txtRadTemperatureModal.Text;
            RespirationRateModal        = txtRadRespirationRate.Text;
            HeartRateModal              = txtRadHeartRate.Text;
            SystollicBloodPressureModal = txtRadSystollicBloodPressure.Text;
            DiastolicBloodPressureModal = txtRadDiastolicBloodPressure.Text;
            HeightModal = txtRadHeight.Text;
            WeightModal = txtRadWeight.Text;


            Page        thePage = (Page)this.Parent.Page;
            PlaceHolder ph      = (PlaceHolder)thePage.FindControl("phForms");

            //Touch.Custom_Forms.KNHAdultIEvaluationForm fr = (Touch.Custom_Forms.KNHAdultIEvaluationForm)Page.LoadControl("Custom forms/KNHAdultIEvaluationForm.ascx");
            //fr.ID = "ID" + Session["CurrentFormName"].ToString();
            // ph.Controls.Add(fr);
            Touch.Custom_Forms.KNHAdultIEvaluationForm theFrm = (Touch.Custom_Forms.KNHAdultIEvaluationForm)ph.FindControl("ID" + Session["CurrentFormName"].ToString());
            Touch.Custom_Forms.KNHAdultIEvaluationForm.Temperature            = TemperatureModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.RespirationRate        = RespirationRateModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.HeartRate              = HeartRateModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.SystollicBloodPressure = SystollicBloodPressureModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.DiastolicBloodPressure = DiastolicBloodPressureModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.Weight = WeightModal;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.Height = HeightModal;


            if (theFrm != null)
            {
                theFrm.SetTextBox();
            }

            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "closeradloading", "CloseModalASPX('IDKNHAdultIEvaluationForm_TheModal_rwVital');", true);
        }
Beispiel #8
0
        protected void rgResults_SelectedCellChanged(object sender, EventArgs e)
        {
            //Check to see if Patient is in another facility - if so then transfer
            string PatientID     = (rgResults.SelectedItems[0] as GridDataItem).GetDataKeyValue("Ptn_Pk").ToString();
            string oldLocationId = string.Empty;

            if (TouchGlobals.ModuleName == "KNH")
            {
                oldLocationId = ((GridDataItem)rgResults.SelectedItems[0]).Cells[10].Text;
            }
            else
            {
                oldLocationId = ((GridDataItem)rgResults.SelectedItems[0]).Cells[9].Text;
            }

            if (oldLocationId != Session["AppLocationId"].ToString())
            {
                Transfer.PatientToFacility(PatientID, oldLocationId, Session["AppLocationId"].ToString(), Convert.ToInt32(Session["AppUserId"]));
            }


            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "redirect", "GoToPatientHome('" + PatientID + "');", true);

            //RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "redirect", "document.getElementById('hdGoToPatient').click();", true);
        }
Beispiel #9
0
        protected void rgData_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            Parametro    objEntity = new Parametro();
            ParametroBll objBll    = new ParametroBll();

            Constants.Parametros idParametro = (Constants.Parametros)Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"]);

            objEntity = objBll.Load(idParametro);

            GridEditableItem editItem      = (GridEditableItem)e.Item;
            Hashtable        updatedValues = new Hashtable();

            e.Item.OwnerTableView.ExtractValuesFromItem(updatedValues, editItem);

            objEntity.Valor = updatedValues["VALOR"].ToString();
            objEntity.IdUltimaModificacion    = this.IdUserCurrent;
            objEntity.FechaUltimaModificacion = DateTime.Now;

            if (!objBll.Update(objEntity))
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errUpd", "alert('Se ha presentado el siguiente error al actualizar la variable:\\n\\n" + Utilidades.AjustarMensajeError(objBll.Error) + "');", true);
            }
            else
            {
                this.rgData.EditIndexes.Clear();
                this.rgData.Rebind();
            }
        }
Beispiel #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void rtxtComSolExm_TextChanged(object sender, EventArgs e)
        {
            ArrayList arr = new ArrayList();

            foreach (RadListBoxItem itm in this.lstMuestras.CheckedItems)
            {
                arr.Add(itm.Value);
            }

            if (arr.Count <= 0)
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "err", "alert('No ha seleccionado ninguna muestra para solicitar al personal de laboratorio');", true);
                return;
            }

            MuestraLaboratorioBll objBll = new MuestraLaboratorioBll();

            if (!objBll.SolicitarMuestrasMedicina(this.IdHist, arr, this.IdUserCurrent, this.rtxtComSolExm.Text.Trim()))
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errSav", "alert('Se ha presentado el siguiente error al solicitar la nueva muestra a laboratorio');", true);
            }
            else
            {
                this.LoadInfoHist(this.IdHist);
            }
        }
Beispiel #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.IdUserCurrent != int.MinValue)
     {
         if (this.IsAdmin || this.PerfilActual == Constants.Perfiles.Radiologia)
         {
             if (!IsPostBack)
             {
                 this.IdHist = Convert.ToInt32(this.GetValueFromRequest("IdHist", "0"));
                 if (this.idHist <= 0)
                 {
                     RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "errHisMed", "alert('No hay informacion acerca del paciente intentelo nuevamente')", true);
                 }
                 else
                 {
                     this.LoadInfoHist(this.idHist);
                 }
             }
             LinkButton lbRegList = (LinkButton)Master.FindControl("lbRegList");
             lbRegList.PostBackUrl = ResolveUrl("../Pendientes.aspx") + "?T=2";
         }
         else
         {
             Response.Redirect(ResolveUrl("~/Inicio.aspx"), true);
         }
     }
     else
     {
         Response.Redirect(ResolveUrl("~/Login.aspx"), true);
     }
     Session["ShowConsultorio"] = true;
     Session["ShowMenu"]        = false;
 }
        protected void btnGoToVisit_Click(object sender, EventArgs e)
        {
            Session["FormIsLoaded"]    = null;
            Session["CurrentFormName"] = "frmVisitTouch";

            Touch.Custom_Forms.frmVisitTouch fr = (frmVisitTouch)Page.LoadControl("frmVisitTouch.ascx"); // new Touch.Custom_Forms.frmVisitTouch();
            fr.ID = "IDVisitForm";
            foreach (Control item in phForms.Controls)
            {
                phForms.Controls.Remove(item);
                //item.Visible = false;
            }
            frmVisitTouch theFrm = (frmVisitTouch)phForms.FindControl("IDVisitForm");

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                phForms.Controls.Add(fr);
            }
            phForms.DataBind();
            updtForms.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "settabs", "setTabs();", true);
        }
Beispiel #13
0
    protected void Page_PreInit(object sender, EventArgs e)
    {
        ScriptManager  scriptManager = null;
        RadAjaxManager ajaxManager   = null;

        foreach (Control control in Page.Form.Controls)
        {
            if (control is ScriptManager)
            {
                scriptManager = (ScriptManager)control;
            }
            if (control is RadAjaxManager)
            {
                ajaxManager = (RadAjaxManager)control;
            }
        }

        if (scriptManager == null)
        {
            scriptManager = new RadScriptManager {
                ID = "RadScriptManager1"
            };
            Page.Form.Controls.AddAt(0, scriptManager);
        }

        if (ajaxManager == null)
        {
            ajaxManager = new RadAjaxManager {
                ID = "RadAjaxManager1"
            };
            Page.Form.Controls.AddAt(1, ajaxManager);
        }
    }
        protected void rgdrugmain_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            string    ID    = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["DrugID"].ToString();
            DataTable table = (DataTable)ViewState["TableDrug"];

            if (table.Rows.Find(ID) != null)
            {
                table.Rows.Find(ID).Delete();
                table.AcceptChanges();
                ViewState["TableDrug"] = table;
            }
            DataTable dtorder = (DataTable)ViewState["TableOrder"];

            if (dtorder.Rows.Find(ID) != null)
            {
                dtorder.Rows.Find(ID).Delete();
                dtorder.AcceptChanges();
                ViewState["TableOrder"] = dtorder;
            }
            DataTable dtdispense = (DataTable)ViewState["TableDispense"];

            if (dtdispense.Rows.Find(ID) != null)
            {
                dtdispense.Rows.Find(ID).Delete();
                dtdispense.AcceptChanges();
                ViewState["TableDispense"] = dtdispense;
            }
            if (((DataTable)ViewState["TableDrug"]).Rows.Count > 0)
            {
                rgdrugmain.DataSource = (DataTable)ViewState["TableDrug"];
                rgdrugmain.DataBind();
            }
            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "JumpToGrid", "document.location = '#sGrid';", true);
        }
Beispiel #15
0
        protected void btnSaveInfo_Click(object sender, EventArgs e)
        {
            HistoriaMedicaBll objHmBll = new HistoriaMedicaBll();
            HistoriaMedica    objHmEnt = objHmBll.Load(this.IdHist);

            if (this.rblEstadoRad.SelectedValue != string.Empty)
            {
                objHmEnt.EstadoRevisionRad = (Constants.EstadoRevision)(Convert.ToByte(this.rblEstadoRad.SelectedValue));
            }
            objHmEnt.ComentarioRad     = this.rtxtCommentRad.Text.Trim();
            objHmEnt.Estatura          = Convert.ToDecimal(this.rntEstatura.Value) / 100;
            objHmEnt.Peso              = Convert.ToDecimal(this.rntPeso.Value);
            objHmEnt.PerimetroCefalico = this.rntPC.Value != null?Convert.ToDecimal(this.rntPC.Value) : decimal.MinValue;

            objHmEnt.TieneRevisionRad           = true;
            objHmEnt.IdUltimaModificacion       = this.IdUserCurrent;
            objHmEnt.FechaUltimaModificacion    = DateTime.Now;
            objHmEnt.RadiografiaTomada          = this.chkRadiografiaTom.Checked;
            objHmEnt.RadiografiaCargadaEmedical = this.chkCargadaEmedical.Checked;
            objHmEnt.RequiereNotificacion       = this.ChkRequiereNotificacion.Checked;
            objHmEnt.NotificacionEnviada        = this.ChkNotificado.Checked;

            if (!objHmBll.Save(objHmEnt, null))
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "savedFailHead", "alert('Se ha presentado el sisguiente inconveniente al almacenar la informacion:\\n\\n" + Utilidades.AjustarMensajeError(objHmBll.Error) + "');", true);
            }
            else
            {
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "savedOKHead", "alert('Se ha almacenado la información');", true);
            }
        }
Beispiel #16
0
        protected void BtnClosePCClick(object sender, EventArgs e)
        {
            DataTable dt = CreatePresentingPCTable();


            foreach (GridDataItem item in RadGridPresenting.Items)
            {
                Label      lblPresenting = (Label)item.FindControl("lblPresenting");
                CheckBox   chkPresenting = (CheckBox)item.FindControl("ChkPresenting");
                RadTextBox txtPresenting = (RadTextBox)item.FindControl("txtPresenting");

                if (chkPresenting.Checked == true)
                {
                    DataRow DR = dt.NewRow();
                    DR["ID"]         = lblPresenting.Text;
                    DR["NAME"]       = chkPresenting.Text;
                    DR["chkValText"] = txtPresenting.Text;
                    dt.Rows.Add(DR);
                }
            }

            Page        thePage = (Page)this.Parent.Page;
            PlaceHolder ph      = (PlaceHolder)thePage.FindControl("phForms");

            Touch.Custom_Forms.KNHAdultIEvaluationForm.DtPresenting        = dt;
            Touch.Custom_Forms.KNHAdultIEvaluationForm.AditionalComplaints = txtAdditionPresentingComplaints.Text;

            Touch.Custom_Forms.KNHAdultIEvaluationForm theFrm = (Touch.Custom_Forms.KNHAdultIEvaluationForm)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            if (theFrm != null)
            {
                theFrm.BindPresentingComp();
            }
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "closeradloading", "CloseModalASPX('IDKNHAdultIEvaluationForm_TheModal_rwPresentingComplaints');", true);
        }
        protected void rbtnConsultar_Click(object sender, EventArgs e)
        {
            if (this.rcbxEmbajada.SelectedValue != string.Empty && this.rcbxTipoVisa.SelectedValue != string.Empty && this.rtxtNumVisa.Text.Trim() != string.Empty)
            {
                HistoriaMedicaBll     objBll = new HistoriaMedicaBll();
                List <HistoriaMedica> lstHm  = objBll.GetHistoriasMedicas(int.MinValue, DateTime.MinValue, Convert.ToInt32(rcbxTipoVisa.SelectedValue), this.rtxtNumVisa.Text.Trim(), true, true, Constants.EstadoRevision.Normal, true, true, true,
                                                                          Constants.EstadoRevision.Normal, true, true, true, Constants.EstadoRevision.Normal, true, true, false, true, false, int.MinValue);

                if (lstHm.Count > 0)
                {
                    HistoriaMedica   objEntHm     = lstHm[0];
                    PacienteBll      objBllPac    = new PacienteBll();
                    Paciente         objEntPac    = objBllPac.Load(objEntHm.IdPaciente);
                    TipoDocumentoBll objBlltipDoc = new TipoDocumentoBll();
                    TipoDocumento    objEntTipDoc = objBlltipDoc.Load(objEntPac.IdTipoDocumento);

                    this.hfIdHist.Value   = objEntHm.Id.ToString();
                    this.lblCodSol.Text   = objEntHm.CodigoSolicitud;
                    this.lblFecIng.Text   = objEntHm.FechaIngreso.ToString("yyyy-MM-dd");
                    this.lblNumDoc.Text   = objEntPac.NumeroDocumento;
                    this.lblPaciente.Text = objEntPac.Nombres + " " + objEntPac.Apellidos;
                    this.lblTipDoc.Text   = objEntTipDoc.Nombre;
                    this.lblTipoCod.Text  = rcbxTipoVisa.SelectedItem.Text;

                    this.pnlInfoPac.Visible = true;

                    AnexoHistoriaBll objAhBll = new AnexoHistoriaBll();
                    int idHistoria            = objEntHm.Id;
                    List <AnexoHistoria> lst  = objAhBll.GetAnexoHistorias(idHistoria, Constants.TipoRevision.MedicinaGeneral, false, int.MinValue, Constants.NombreArchivoImagenPaciente);
                    if (lst.Count > 0)
                    {
                        AnexoHistoria objAhFileImage = lst[0];
                        if (Directory.Exists(this.PathFilesToAttach + idHistoria + "\\"))
                        {
                            StreamReader srImg  = new StreamReader(this.PathFilesToAttach + idHistoria + "\\" + objAhFileImage.NombreArchivo);
                            BinaryReader reader = new BinaryReader(srImg.BaseStream);
                            Byte[]       data   = reader.ReadBytes((int)srImg.BaseStream.Length);

                            string contentFile = Convert.ToBase64String(data);
                            this.imgPac.ImageUrl = String.Format("data:image/png;base64,{0}", contentFile);
                        }
                    }

                    /*
                     * this.Page.Controls.Add(new LiteralControl("<span>Nombre paciente: " + objEntPac.Nombres + " " + objEntPac.Apellidos + "</span>"));
                     */
                }
                else
                {
                    this.pnlInfoPac.Visible = false;
                    RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "notFounded", "alert('La historia con tipo " + rcbxTipoVisa.SelectedItem.Text + " y número " + this.rtxtNumVisa.Text.Trim() + " no se ha encontrado o aun no ha finalizado \\n\\nPara regresarla de la embajada');", true);
                }
            }
            else
            {
                this.pnlInfoPac.Visible = false;
                RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "notSelected", "alert('No ha seleccionado los datos para busqueda del paciente');", true);
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager manager = RadScriptManager.GetCurrent(Page);

        manager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.Core.js", "Telerik.Web.UI"));
        manager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.jQuery.js", "Telerik.Web.UI"));
        manager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.jQueryInclude.js", "Telerik.Web.UI"));
        manager.Scripts.Add(new ScriptReference(ResolveUrl("Scripts/jquery.tmpl.js")));
    }
Beispiel #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
            string JS = "<script src='Scripts/keyb/jquery.keyboard.js' type='text/javascript'></script>" +
                        "<script type='text/javascript' src='Scripts/keyb/demo/demo.js'></script> " +
                        "<script src='Scripts/keyb/jquery.keyboard.extension-typing.js' type='text/javascript'></script>";

            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "loading", JS, false);
        }
 protected void btnGoToCare_Click(object sender, EventArgs e)
 {
     phForms.Controls.Clear();
     phForms.EnableViewState = false;
     Touch.Custom_Forms.frmCareEndedTouch fr = (frmCareEndedTouch)Page.LoadControl("frmCareEndedTouch.ascx");
     phForms.Controls.Add(fr);
     updtForms.Update();
     RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "settabs", "setTabs();", true);
 }
 protected void btnGoToNon_Click(object sender, EventArgs e)
 {
     Session["IsFirstLoad"] = "true";
     phForms.Controls.Clear();
     phForms.EnableViewState = false;
     Touch.Custom_Forms.frmClinicalNotesTouch fr = (frmClinicalNotesTouch)Page.LoadControl("frmClinicalNotesTouch.ascx");
     phForms.Controls.Add(fr);
     updtForms.Update();
     RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "settabs", "setTabs();", true);
 }
Beispiel #22
0
        protected void btnSetPattern_Click(object sender, EventArgs e)
        {
            BUser ptrnLockUSer;

            ptrnLockUSer = (BUser)ObjectFactory.CreateInstance("BusinessProcess.Administration.BUser, BusinessProcess.Administration");

            ptrnLockUSer.SaveUserLock(Convert.ToInt32(Session["AppUserId"].ToString()), Convert.ToInt32(Session["AppLocationId"].ToString()), patLock.Value, Request.RawUrl.ToString());

            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "ClosePattern", "closePatternWindow();", true);
        }
        protected void RadOtherVaccine_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (ViewState["TblImmunisation"] == null)
            {
                DtImmunisation = CreateImmunisationTable();
            }
            else
            {
                DtImmunisation = (DataTable)ViewState["TblImmunisation"];
            }
            DataRow DR = DtImmunisation.NewRow();

            int dtnextId = Convert.ToInt32(DtImmunisation.Rows.Count) + 1;


            if (e.CommandName == "Insert")
            {
                if (RadOtherVaccine != null)
                {
                    // GridItem[] footerItems = RadOtherVaccine.MasterTableView.GetItems(GridItemType.Footer);
                    GridFooterItem footeritem = (GridFooterItem)RadOtherVaccine.MasterTableView.GetItems(GridItemType.Footer)[0];



                    if (footeritem != null)
                    {
                        Telerik.Web.UI.RadTextBox    txtimmuOther           = (Telerik.Web.UI.RadTextBox)footeritem.FindControl("txtFooterRadVaccineName");
                        Telerik.Web.UI.RadButton     btnFooterOthers        = (Telerik.Web.UI.RadButton)footeritem.FindControl("btnFooterOthers");
                        Telerik.Web.UI.RadButton     btnCatchupFooterOthers = (Telerik.Web.UI.RadButton)footeritem.FindControl("btnCatchupFooterOthers");
                        Telerik.Web.UI.RadDatePicker dtFooterOtherDate      = (Telerik.Web.UI.RadDatePicker)footeritem.FindControl("dtFooterOtherDate");

                        if (ValidateAddImmunisation(txtimmuOther.Text.ToString(), dtFooterOtherDate.SelectedDate, btnFooterOthers.SelectedToggleState.Text.ToString()) == false)
                        {
                            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "JumpToGrid", "document.location = '#sGrid';", true);
                            return;
                        }


                        DR["ImmunisationOther"] = txtimmuOther.Text;
                        DR["ImmunisationDate"]  = Convert.ToDateTime(dtFooterOtherDate.SelectedDate.ToString()).ToShortDateString();
                        DR["ImmunisationCU"]    = btnCatchupFooterOthers.SelectedToggleState.Text;
                        DR["Administered"]      = btnFooterOthers.SelectedToggleState.Text;
                        DR["ID"]       = dtnextId.ToString() + txtimmuOther.Text;
                        DR["EditMode"] = "DELETE";
                        DtImmunisation.Rows.Add(DR);
                        ViewState["TblImmunisation"] = DtImmunisation;
                        RadOtherVaccine.DataSource   = DtImmunisation;
                        RadOtherVaccine.DataBind();
                    }
                }
            }


            //GridDataItem row = RadGrid1.Items[rowNo];
        }
Beispiel #24
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"></see> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"></see> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            if (Page != null && RadScriptManager.GetCurrent(Page) == null)
            {
                objRadScriptManager = new RadScriptManager();
                objRadScriptManager.ID = "objScriptManager";
                Page.Form.Controls.AddAt(0, objRadScriptManager);
            }

            base.OnInit(e);
        }
    protected void btnGI_Remarks_Add_Click(object sender, EventArgs e)
    {
        string host       = HttpContext.Current.Request.Url.Authority;
        string remarksid  = "";
        string remarkCode = "gatewayinbound";

        rwAdd_GI_Remarks.NavigateUrl = "http://" + host + "/portal/UserModal/Remarks/AddRemarks.aspx?ID=" + remarksid + "&remarkCode=" + remarkCode;
        //rwAdd_GI_Remarks.NavigateUrl = "http://" + host + "/" + WebPathName + "/portal/UserModal/Remarks/AddRemarks.aspx?ID=" + remarksid + "&remarkCode=" + remarkCode;
        string script = "function f(){$find(\"" + rwAdd_GI_Remarks.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";

        RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
    }
    protected void btnCT_Reason_Add_Click(object sender, EventArgs e)
    {
        string host       = HttpContext.Current.Request.Url.Authority;
        string reasonId   = "";
        string statusCode = "cargotransfer";

        rwAdd_CT_Reason.NavigateUrl = "http://" + host + "/portal/UserModal/Reason/AddReason.aspx?ID=" + reasonId + "&StatusCode=" + statusCode;
        //rwAdd_CT_Reason.NavigateUrl = "http://" + host + "/" + WebPathName + "/portal/UserModal/Status/AddStatus.aspx?ID=" + statusId + "&statusCode=" + statusCode;
        string script = "function f(){$find(\"" + rwAdd_CT_Reason.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";

        RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
    }
    protected void btnDIS_Batch_Add_Click(object sender, EventArgs e)
    {
        string host      = HttpContext.Current.Request.Url.Authority;
        string batchid   = "";
        string batchCode = "distribution";

        rwAdd_DIS_Batch.NavigateUrl = "http://" + host + "/portal/UserModal/Batch/AddBatch.aspx?ID=" + batchid + "&batchCode=" + batchCode;
        //rwAdd_DIS_Batch.NavigateUrl = "http://" + host + "/" + WebPathName + "/portal/UserModal/Batch/AddBatch.aspx?ID=" + batchid + "&batchCode=" + batchCode;
        string script = "function f(){$find(\"" + rwAdd_DIS_Batch.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";

        RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
    }
        private void StartNodeInEditMode(string nodeValue)
        {
            //find the node by its Value and edit it when page loads
            string js = "Sys.Application.add_load(editNode); function editNode(){ ";

            js += "var tree = $find(\"" + this.treeEstructura.ClientID + "\");";
            js += "var node = tree.findNodeByValue('" + nodeValue + "');";
            js += "if (node) node.startEdit();";
            js += "Sys.Application.remove_load(editNode);};";

            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "nodeEdit", js, true);
        }
 protected void OrderGrid_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
     if (e.Item is GridDataItem)
     {
         RadComboBox combo = ((RadComboBox)e.Item.FindControl("rdcmbfrequency"));
         combo.DataSource     = ((DataTable)Session["Frequency"]);
         combo.DataValueField = "FrequencyId";
         combo.DataTextField  = "FrequencyName";
         combo.DataBind();
     }
     RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "JumpToGrid", "document.location = '#sGrid';", true);
 }
    protected void btnDIS_Batch_Edit_Click(object sender, EventArgs e)
    {
        string host    = HttpContext.Current.Request.Url.Authority;
        string batchid = this.rcbDIS_Batch.SelectedItem.Value.ToString();

        if (batchid != "")
        {
            // rwEdit_DIS_Batch.NavigateUrl = "http://" + host + "/" + WebPathName + "/portal/UserModal/Batch/EditBatch.aspx?ID= + groupdid;
            rwEdit_DIS_Batch.NavigateUrl = "http://" + host + "/portal/UserModal/Batch/EditBatch.aspx?ID=" + batchid;
            string script = "function f(){$find(\"" + rwEdit_DIS_Batch.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
            RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.IdUserCurrent != int.MinValue)
     {
         this.IdHist               = Convert.ToInt32(this.GetValueFromRequest("IdHist", "0"));
         this.TipoRevision         = (Constants.TipoRevision)Convert.ToInt32(this.GetValueFromRequest("IdTR", "3"));
         this.IdMuestraRelacionada = Convert.ToInt32(this.GetValueFromRequest("IdMu", int.MinValue.ToString()));
     }
     else
     {
         RadScriptManager.RegisterClientScriptBlock(this, this.GetType(), "cloSess", "CerrarVentana();", true);
     }
 }
Beispiel #32
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"></see> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"></see> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            objCommonUtility.RenderBusyBox(this.Page);
            if (Page != null && RadScriptManager.GetCurrent(Page) == null)
            {
                objRadScriptManager = new RadScriptManager();
                objRadScriptManager.ID = "objScriptManager";
                Page.Form.Controls.AddAt(0, objRadScriptManager);
            }

            base.OnInit(e);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     string target = Request["__EVENTTARGET"];
     NachbearbeitungAbmeldung auftragNeu = Page as NachbearbeitungAbmeldung;
     script = auftragNeu.getScriptManager() as RadScriptManager;
     script.RegisterPostBackControl(Button1);
     if (!String.IsNullOrEmpty(target))
     {
         if (target.Equals("UserValueConfirmLieferscheine") || target.Equals("UserValueDontConfirmLieferscheine"))
         {
             UserValueConfirm.Value = null;
             userAuswahl.Value = target;
             if (!string.IsNullOrEmpty(userAuswahl.Value) && userAuswahl.Value.Equals("UserValueDontConfirmLieferscheine"))
             {
                 OffenePanel.Visible = true;
                 NochOffenAuftraegeRadGrid.Enabled = true;
                 NochOffenAuftraegeRadGrid.Rebind();
             }
             else if (target.Equals("UserValueConfirmLieferscheine"))
             {
                 LieferscheinErstellen();
             }
         }
         if (!target.Contains("LieferungButton") && !target.Contains("Button1"))
         {
         }
     }
 }
Beispiel #34
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (comeFromOrder == true)
            {
                KVSWebApplication.Auftragseingang.ZulassungLaufkunde auftrag = Page as KVSWebApplication.Auftragseingang.ZulassungLaufkunde;
                RadScriptManager script = auftrag.getScriptManager() as RadScriptManager;
                script.RegisterPostBackControl(AddAdressButton);
            }
            else
            {
                AuftragsbearbeitungNeuzulassung auftragNeu = Page as AuftragsbearbeitungNeuzulassung;
                script = auftragNeu.getScriptManager() as RadScriptManager;
                script.RegisterPostBackControl(AddAdressButton);
            }
            CheckOpenedOrders();
            string target = Request["__EVENTTARGET"] == null ? "" : Request["__EVENTTARGET"];
            ZulassungErfolgtLabel.Visible = false;
            ZulassungErrLabel.Visible = false;
            if (String.IsNullOrEmpty(target))
                if (Session["orderNumberSearch"] != null)
                    if (!String.IsNullOrEmpty(Session["orderNumberSearch"].ToString()))
                        target = "IamFromSearch";
            StornierungErfolgLabel.Visible = false;
            if (Session["CustomerIndex"] != null)
            {
                if (!target.Contains("RadComboBoxCustomerZulassungsstelle") && !target.Contains("CustomerDropDownListZulassungsstelle") && !target.Contains("NewPositionZulButton") && !target.Contains("StornierenButton"))
                {
                    if(RadComboBoxCustomerZulassungsstelle.Items.Count()>0)
                    RadComboBoxCustomerZulassungsstelle.SelectedValue = Session["CustomerIndex"].ToString();
                   // CustomerDropDownListZulassungsstelle.DataBind();
                    if (Session["CustomerId"] != null)
                    {
                        if (CustomerDropDownListZulassungsstelle.Items.Count() > 0)
                        CustomerDropDownListZulassungsstelle.SelectedValue = Session["CustomerId"].ToString();

                        RadGridNeuzulassung.Enabled = true;

                        if (target.Contains("OffenNeuzulassung") || target.Contains("RadTabStripNeuzulassung") || target.Contains("IamFromSearch") || target.Contains("ShowAll"))
                            RadGridNeuzulassung.DataBind();
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            thisUserPermissions.AddRange(KVSCommon.Database.User.GetAllPermissionsByID(Int32.Parse(Session["CurrentUserId"].ToString())));
            bool canDeleteItem = thisUserPermissions.Contains("LOESCHEN_AUFTRAGSPOSITION");
            if (canDeleteItem == false)
            {
                foreach (var table in RadGridOffNeuzulassung.MasterTableView.DetailTables)
                {
                    if (table.GetColumn("RemoveOrderItem") != null)
                        table.GetColumn("RemoveOrderItem").Visible = false;
                }
            }
            AuftragsbearbeitungNeuzulassung auftragNeu = Page as AuftragsbearbeitungNeuzulassung;
            script = auftragNeu.getScriptManager() as RadScriptManager;
            script.RegisterPostBackControl(ZulassungsstelleLieferscheineButton);
            CheckOpenedOrders();
            string target = Request["__EVENTTARGET"] == null ? "" : Request["__EVENTTARGET"];
            if (String.IsNullOrEmpty(target))
                if (Session["orderNumberSearch"] != null)
                    if (!String.IsNullOrEmpty(Session["orderNumberSearch"].ToString()))
                        target = "IamFromSearch";

            StornierungErfolgLabel.Visible = false;

            if (Session["CustomerIndex"] != null)
            {
                if (!target.Contains("RadComboBoxCustomerOffenNeuzulassung") && !target.Contains("StornierenButton") && !target.Contains("CustomerDropDownListOffenNeuzulassung") && !target.Contains("NewPositionButton"))
                {

                    //CustomerDropDownListOffenNeuzulassung.DataBind();
                    if (Session["CustomerId"] != null)
                    {
                        if (!Page.IsPostBack)
                        {
                            if (CustomerDropDownListOffenNeuzulassung.Items.Count > 0 && RadComboBoxCustomerOffenNeuzulassung.Items.Count() > 0)
                            {
                                CustomerDropDownListOffenNeuzulassung.SelectedValue = Session["CustomerId"].ToString();
                                RadComboBoxCustomerOffenNeuzulassung.SelectedValue = Session["CustomerIndex"].ToString();
                            }
                        }

                        if (Session["orderStatusSearch"] != null)
                            if (!Session["orderStatusSearch"].ToString().Contains("Zulassungsstelle"))
                                if (target.Contains("ZulassungNachbearbeitung") || target.Contains("RadTabStripNeuzulassung") || target.Contains("IamFromSearch"))
                                {
                                    RadGridOffNeuzulassung.Enabled = true;
                                    RadGridOffNeuzulassung.DataBind();
                                }
                    }
                }
            }
        }
Beispiel #36
0
		/// <summary>
		/// AddScriptManager is used internally by the framework to add a ScriptManager control to the page.
		/// </summary>
		/// <param name="page">the page instance.</param>
		/// <param name="checkCdn">Whether check cdn settings from host settings.</param>
        public static void AddScriptManager(Page page, bool checkCdn)
        {
			if (GetScriptManager(page) == null)
            {
                using (var scriptManager = new RadScriptManager
	                {
		                ID = "ScriptManager", 
						EnableScriptGlobalization = true, 
						SupportsPartialRendering = true, 
						EnableHandlerDetection = false
	                })
                {
					if (page.Form != null)
                    {
                        try
                        {
							if (checkCdn)
							{
								scriptManager.EnableCdn = Host.EnableMsAjaxCdn;
								scriptManager.CdnSettings.TelerikCdn = Host.EnableTelerikCdn ? TelerikCdnMode.Enabled : TelerikCdnMode.Disabled;
								if (scriptManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnBasicUrl))
								{
									scriptManager.CdnSettings.BaseUrl = Host.TelerikCdnBasicUrl;
								}
								if (scriptManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnSecureUrl))
								{
									scriptManager.CdnSettings.BaseSecureUrl = Host.TelerikCdnSecureUrl;
								}
							}
							page.Form.Controls.AddAt(0, scriptManager);
                        }
                        catch
                        {
                            //suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks
                        }
                        if (HttpContext.Current.Items["System.Web.UI.ScriptManager"] == null)
                        {
                            HttpContext.Current.Items.Add("System.Web.UI.ScriptManager", true);
                        }
                    }
                }
				using (var stylesheetManager = new RadStyleSheetManager { ID = "StylesheetManager", EnableHandlerDetection = false })
                {
					if (page.Form != null)
                    {
                        try
                        {
							if (checkCdn)
							{
								stylesheetManager.CdnSettings.TelerikCdn = Host.EnableTelerikCdn ? TelerikCdnMode.Enabled : TelerikCdnMode.Disabled;
								if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnBasicUrl))
								{
									stylesheetManager.CdnSettings.BaseUrl = Host.TelerikCdnBasicUrl;
								}
								if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnSecureUrl))
								{
									stylesheetManager.CdnSettings.BaseSecureUrl = Host.TelerikCdnSecureUrl;
								}
							}
							page.Form.Controls.AddAt(0, stylesheetManager);
                        }
                        catch
                        {
                            //suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks
                        }
                    }
                }
            }
        }
Beispiel #37
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string target = Request["__EVENTTARGET"];
     AuftragsbearbeitungNeuzulassung auftragNeu = Page as AuftragsbearbeitungNeuzulassung;
     script = auftragNeu.getScriptManager() as RadScriptManager;
     man = auftragNeu.getRadAjaxManager1() as RadAjaxManager;
     if (!String.IsNullOrEmpty(target))
         if (!target.Contains("LieferscheinDruckenButton") && !target.Contains("EditOffenColumn") && !target.Contains("DispatchOrderNumberBox") && !target.Contains("isSelfDispathCheckBox") && !target.Contains("EditButton"))
             RadGridVersand.Rebind();
 }