예제 #1
0
    private void fillCantones()
    {
        psvm = new PersonaServiceModel();
        ComboCanton.Items.Clear();
        ComboCanton.AppendDataBoundItems = true;
        ComboCanton.DataSource           = comboProvincia.SelectedItem.Value == "0" ? new List <SCPM_CANTONES>() : psvm.getCantonesByProvincia(Convert.ToInt32(comboProvincia.SelectedItem.Value));
        ComboCanton.DataTextField        = "CAN_NOM";
        ComboCanton.DataValueField       = "CAN_ID";
        ComboCanton.DataBind();
        if (ComboCanton.Items.Count > 0)
        {
            ComboCanton.Enabled = true;
            ComboCanton.Items.Add(new ListItem("--Seleccionar--", "0"));
            ComboCanton.SelectedValue = "0";
            ComboCanton_SelectedIndexChanged(ComboCanton, null);
        }
        else
        {
            ComboCanton.Enabled = false;
            ComboCanton.Items.Add(new ListItem("--añadir--", ""));

            ComboParroquia.Enabled = false;
            ComboParroquia.Items.Add(new ListItem("--Añadir--", ""));

            comboSector.Enabled = false;
            comboSector.Items.Add(new ListItem("--Añadir--", ""));
        }
    }
예제 #2
0
    private void fillParroquias()
    {
        psvm = new PersonaServiceModel();
        ComboParroquia.Items.Clear();
        ComboParroquia.AppendDataBoundItems = true;
        ComboParroquia.DataSource           = ComboCanton.SelectedItem.Value == "0" ? new List <SCPM_PARROQUIAS>() : psvm.getParroquiasByCanton(Convert.ToInt32(ComboCanton.SelectedItem.Value));
        ComboParroquia.DataTextField        = "PAR_NOM";
        ComboParroquia.DataValueField       = "PAR_ID";
        ComboParroquia.DataBind();
        if (ComboParroquia.Items.Count > 0)
        {
            ComboParroquia.Enabled = true;
            ComboParroquia.Items.Add(new ListItem("--Seleccionar--", "0"));
            ComboParroquia.SelectedValue = "0";

            ComboParroquia_SelectedIndexChanged(ComboParroquia, null);
        }
        else
        {
            ComboParroquia.Enabled = false;
            ComboParroquia.Items.Add(new ListItem("--Añadir--", ""));

            comboSector.Enabled = false;
            comboSector.Items.Add(new ListItem("--Añadir--", ""));
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillProvincias();

            //discapacidad
            fillDiscapacidad();

            //documento
            fillDocumento();


            //estado civil
            fillEstadoCivil();

            //comboProfesion
            fillProfesion();

            //comboParentesco
            fillPArentesco();

            //coboRaza
            fillRaza();

            //comboPais
            fillPais();
        }
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillComboSangre();
            //comboPais
            fillPais(comboPais);

            //documento
            fillDocumento(comboDocumento);

            //coboRaza
            fillRaza(comboRaza);

            //estado civil
            fillEstadoCivil();

            //provincia
            fillProvincias();

            //conyugue
            //nacionalidad
            fillPais(con_pais);
            //documento
            fillDocumento(con_comboDocumento);
            //profesion
            fillProfesion(con_comboProfesion);

            //discapacidad
            //fill discapacidades
            Repeater1.DataSource = psvm.getAllDiscapacidadControl();
            Repeater1.DataBind();
            //fill parentexco
            fillParentesco(dis_comboParentesco);

            //emergencia
            fillParentesco(emg_comboParentesco);

            var _per_ID = Request.QueryString["per_id"];
            if (_per_ID != null)
            {
                int  per_id;
                bool isNumeric = int.TryParse(_per_ID, out per_id);
                if (isNumeric)
                {
                    //fill personas
                    fillPersonaData(per_id);
                }
                else
                {
                    HelperUtil.showNotifi("persona no encontrada");
                }
            }
            else
            {
                HelperUtil.showNotifi("persona no encontrada");
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     persvm = new PersonaServiceModel();
     if (!IsPostBack)
     {
         ReportViewer1.Visible = false;
     }
 }
예제 #6
0
 protected void addParentesco_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addParentesco(new SCPM_PARENTESCOS() { PARE_NOM = inParentesco.Text, PARE_EST = onParentesco.Checked }))
     {
         fillPArentesco();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #7
0
 protected void addDiscapacidad_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addDiscapacidad(new SCPM_TIPO_DISCAPACIDADES() { TIP_DIS_NOM = inDiscapacidad.Text, TIP_DIS_EST = onProvincia.Checked }))
     {
         fillDiscapacidad();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #8
0
 protected void addDocumento_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addDocumento(new SCPM_TIPO_IDENTIFICACIONES() { TIP_IDE_NOM = inDocumento.Text, TIP_IDE_EST = onDocumento.Checked }))
     {
         fillDocumento();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #9
0
 protected void addEstadoCivil_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addEstadoCivil(new SCPM_ESTADOS_CIVILES() { EST_CIV_NOM = inEstadoCivil.Text, EST_CIV_EST = onEstadoCivil.Checked }))
     {
         fillEstadoCivil();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #10
0
 protected void addPais_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addPais(new SCPM_PAIS() { PAI_NACIONALIDAD = inPais.Text, PAI_EST = onPais.Checked }))
     {
         fillPais();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #11
0
    protected void addCanton_Click(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();

        if (psvm.addCanton(new SCPM_CANTONES() { CAN_NOM = inCanton.Text, CAN_EST = onCanton.Checked }, Convert.ToInt32(comboProvincia.SelectedValue)))
        {
            fillCantones();
            HelperUtil.showNotifi("añadido");
        }
        else
            HelperUtil.showNotifi("no añadido");
    }
예제 #12
0
 protected void editDocumento_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editDocumento(new SCPM_TIPO_IDENTIFICACIONES()
     {
         TIP_IDE_COD = Convert.ToInt32(comboDocumento.SelectedValue), TIP_IDE_NOM = inDocumento.Text, TIP_IDE_EST = onDocumento.Checked
     }))
     {
         fillDocumento();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #13
0
 protected void addDocumento_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addDocumento(new SCPM_TIPO_IDENTIFICACIONES()
     {
         TIP_IDE_NOM = inDocumento.Text, TIP_IDE_EST = onDocumento.Checked
     }))
     {
         fillDocumento();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #14
0
 protected void editDiscapacidad_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editDiscapacidad(new SCPM_TIPO_DISCAPACIDADES()
     {
         TIP_DIS_ID = Convert.ToInt32(comboDiscapacidad.SelectedValue), TIP_DIS_NOM = inDiscapacidad.Text, TIP_DIS_EST = onProvincia.Checked
     }))
     {
         fillDiscapacidad();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #15
0
 protected void addDiscapacidad_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addDiscapacidad(new SCPM_TIPO_DISCAPACIDADES()
     {
         TIP_DIS_NOM = inDiscapacidad.Text, TIP_DIS_EST = onProvincia.Checked
     }))
     {
         fillDiscapacidad();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #16
0
 protected void editParroquia_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editParroquia(new SCPM_PARROQUIAS()
     {
         PAR_ID = Convert.ToInt32(ComboParroquia.SelectedValue), PAR_NOM = inParroquia.Text, PAR_EST = onParroquia.Checked
     }, Convert.ToInt32(ComboCanton.SelectedValue)))
     {
         fillParroquias();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #17
0
 protected void addPais_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addPais(new SCPM_PAIS()
     {
         PAI_NACIONALIDAD = inPais.Text, PAI_EST = onPais.Checked
     }))
     {
         fillPais();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #18
0
 protected void addParentesco_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addParentesco(new SCPM_PARENTESCOS()
     {
         PARE_NOM = inParentesco.Text, PARE_EST = onParentesco.Checked
     }))
     {
         fillPArentesco();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #19
0
 protected void addProfesion_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addProfesion(new SCPM_PROFESIONES()
     {
         PROF_NOM = inProfesion.Text, PROF_EST = onProfesion.Checked
     }))
     {
         fillProfesion();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #20
0
 protected void addEstadoCivil_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addEstadoCivil(new SCPM_ESTADOS_CIVILES()
     {
         EST_CIV_NOM = inEstadoCivil.Text, EST_CIV_EST = onEstadoCivil.Checked
     }))
     {
         fillEstadoCivil();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #21
0
 protected void editEstadoCivil_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editEstadoCivil(new SCPM_ESTADOS_CIVILES()
     {
         EST_CIV_ID = Convert.ToInt32(comboEstadoCivil.SelectedValue), EST_CIV_NOM = inEstadoCivil.Text, EST_CIV_EST = onEstadoCivil.Checked
     }))
     {
         fillEstadoCivil();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #22
0
 protected void addRaza_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addRaza(new SCPM_RAZAS()
     {
         RAZ_NOM = inRaza.Text, RAZ_EST = onRaza.Checked
     }))
     {
         fillRaza();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #23
0
 protected void editProfesion_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editProfesion(new SCPM_PROFESIONES()
     {
         PROF_ID = Convert.ToInt32(comboProfesion.SelectedValue), PROF_NOM = inProfesion.Text, PROF_EST = onProfesion.Checked
     }))
     {
         fillProfesion();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #24
0
 protected void addProvincia_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addProvincia(new SCPM_PROVINCIAS()
     {
         PRO_NOM = inProvincia.Text, PRO_EST = onProvincia.Checked
     }))
     {
         fillProvincias();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #25
0
 protected void editParentesco_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editParentesco(new SCPM_PARENTESCOS()
     {
         PARE_ID = Convert.ToInt32(comboParentesco.SelectedValue), PARE_NOM = inParentesco.Text, PARE_EST = onParentesco.Checked
     }))
     {
         fillPArentesco();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #26
0
 protected void editProvincia_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editProvincia(new SCPM_PROVINCIAS()
     {
         PRO_ID = Convert.ToInt32(comboProvincia.SelectedValue), PRO_NOM = inProvincia.Text, PRO_EST = onProvincia.Checked
     }))
     {
         fillProvincias();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #27
0
 protected void editRaza_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editRaza(new SCPM_RAZAS()
     {
         RAZ_ID = Convert.ToInt32(coboRaza.SelectedValue), RAZ_NOM = inRaza.Text, RAZ_EST = onRaza.Checked
     }))
     {
         fillRaza();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #28
0
 protected void editCanton_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editCanton(new SCPM_CANTONES()
     {
         CAN_ID = Convert.ToInt32(ComboCanton.SelectedValue), CAN_NOM = inCanton.Text, CAN_EST = onCanton.Checked
     }, Convert.ToInt32(comboProvincia.SelectedValue)))
     {
         fillCantones();
         HelperUtil.showNotifi("añadido");
     }
     else
     {
         HelperUtil.showNotifi("no añadido");
     }
 }
예제 #29
0
 protected void editPais_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editPais(new SCPM_PAIS()
     {
         PAI_ID = Convert.ToInt32(comboPais.SelectedValue), PAI_NACIONALIDAD = inPais.Text, PAI_EST = onPais.Checked
     }))
     {
         fillPais();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #30
0
 protected void editSector_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editSector(new SCPM_SECTORES()
     {
         SEC_ID = Convert.ToInt32(comboSector.SelectedValue), SEC_NOM = inSector.Text, SEC_EST = onSector.Checked
     }, Convert.ToInt32(ComboParroquia.SelectedValue)))
     {
         fillSectores();
         HelperUtil.showNotifi("editado");
     }
     else
     {
         HelperUtil.showNotifi("no editado");
     }
 }
예제 #31
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PuestoServiceModel();
        persvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillUnidades(comboUnidad);
            fillRelacionLab();

            comboUnidad.Enabled = false;
            ComboArea.Enabled = false;
            comboRelacionLab.Enabled = false;
            comboCargo.Enabled = false;
            inFechaStart.Enabled = false;
            inFechaEnd.Enabled = false;
        }
    }
예제 #32
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm   = new PuestoServiceModel();
        persvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillUnidades(comboUnidad);
            fillRelacionLab();

            comboUnidad.Enabled      = false;
            ComboArea.Enabled        = false;
            comboRelacionLab.Enabled = false;
            comboCargo.Enabled       = false;
            inFechaStart.Enabled     = false;
            inFechaEnd.Enabled       = false;
        }
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (tipox.SelectedValue == "999")
        {
            HelperUtil.showNotifi("seleccione tipo de reporte");
            ReportViewer1.Visible = false;
            return;

        }
        try
        {
            var res = new PersonaServiceModel().getPersonasByID(Convert.ToInt32(e.CommandArgument.ToString()));
            if (res.Count > 0 && res.FirstOrDefault() != null)
            {
                ReportViewer1.Visible = true;
                SCPM_PERSONALES p = res.First();
                string per_nom = String.Format("{0} {1} {2} {3}", p.PER_APE_PAT, p.PER_APE_MAT, p.PER_NOM1, p.PER_NOM2);

                ReportViewer1.ProcessingMode = ProcessingMode.Local;
                ReportViewer1.LocalReport.ReportPath = Server.MapPath("/Reportes/ReportePersonaHistorial.rdlc");

                ReportDataSource datasource = new ReportDataSource("DataSet1", new ReporteServiceModel().getPersonaHistory(tipox.SelectedValue, p));

                ReportViewer1.LocalReport.DataSources.Clear();
                ReportParameter rp1 = new ReportParameter("personax", "Historial de: " + per_nom);

                ReportViewer1.LocalReport.DataSources.Add(datasource);
                ReportViewer1.ProcessingMode = ProcessingMode.Local;
                ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1 });
                ReportViewer1.LocalReport.Refresh();

            }
            else
            {
                HelperUtil.showNotifi("No se encontro funcionario");
                ReportViewer1.Visible = false;
            }
        }
        catch (Exception ex)
        {
            HelperUtil.showNotifi("No se encontro funcionario");
            ReportViewer1.Visible = false;
        }
    }
예제 #34
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillComboSangre();
            //comboPais
            fillPais(comboPais);

            //documento
            fillDocumento(comboDocumento);

            //coboRaza
            fillRaza(comboRaza);

            //estado civil
            fillEstadoCivil();

            //provincia
            fillProvincias();

            //conyugue
            //nacionalidad
            fillPais(con_pais);
            //documento
            fillDocumento(con_comboDocumento);
            //profesion
            fillProfesion(con_comboProfesion);

            //discapacidad
            //fill discapacidades
            Repeater1.DataSource = psvm.getAllDiscapacidadControl();
            Repeater1.DataBind();
            //fill parentexco
            fillParentesco(dis_comboParentesco);

            //emergencia
            fillParentesco(emg_comboParentesco);

            //inFechaNac.Text = DateTime.Now.ToString("yyyy-MM-dd");
            //con_fechaNacimiento.Text = DateTime.Now.ToString("yyyy-MM-dd");
        }
    }
예제 #35
0
 private void fillSectores()
 {
     psvm = new PersonaServiceModel();
     comboSector.Items.Clear();
     comboSector.AppendDataBoundItems = true;
     comboSector.DataSource           = psvm.getSectorByParroquiaID(Convert.ToInt32(ComboParroquia.SelectedItem.Value));
     comboSector.DataTextField        = "SEC_NOM";
     comboSector.DataValueField       = "SEC_ID";
     comboSector.DataBind();
     if (comboSector.Items.Count > 0)
     {
         comboSector.Enabled = true;
     }
     else
     {
         comboSector.Enabled = false;
         comboSector.Items.Add(new ListItem("--Añadir--", ""));
     }
 }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        if (tipox.SelectedValue == "999")
        {
            HelperUtil.showNotifi("seleccione tipo de reporte");
            ReportViewer1.Visible = false;
            return;
        }
        try
        {
            var res = new PersonaServiceModel().getPersonasByID(Convert.ToInt32(e.CommandArgument.ToString()));
            if (res.Count > 0 && res.FirstOrDefault() != null)
            {
                ReportViewer1.Visible = true;
                SCPM_PERSONALES p       = res.First();
                string          per_nom = String.Format("{0} {1} {2} {3}", p.PER_APE_PAT, p.PER_APE_MAT, p.PER_NOM1, p.PER_NOM2);

                ReportViewer1.ProcessingMode         = ProcessingMode.Local;
                ReportViewer1.LocalReport.ReportPath = Server.MapPath("/Reportes/ReportePersonaHistorial.rdlc");

                ReportDataSource datasource = new ReportDataSource("DataSet1", new ReporteServiceModel().getPersonaHistory(tipox.SelectedValue, p));

                ReportViewer1.LocalReport.DataSources.Clear();
                ReportParameter rp1 = new ReportParameter("personax", "Historial de: " + per_nom);

                ReportViewer1.LocalReport.DataSources.Add(datasource);
                ReportViewer1.ProcessingMode = ProcessingMode.Local;
                ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1 });
                ReportViewer1.LocalReport.Refresh();
            }
            else
            {
                HelperUtil.showNotifi("No se encontro funcionario");
                ReportViewer1.Visible = false;
            }
        }
        catch (Exception ex)
        {
            HelperUtil.showNotifi("No se encontro funcionario");
            ReportViewer1.Visible = false;
        }
    }
예제 #37
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            //exampledata();

            Repeater1.DataSource = psvm.getAllPersonas();
            Repeater1.DataBind();

            if (Repeater1.Items.Count > 0)
            {
                Repeater1.Visible = true;
                emptyMsg.Visible  = false;
            }
            else
            {
                Repeater1.Visible = false;
                emptyMsg.Visible  = true;
            }
        }
    }
예제 #38
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            //exampledata();

            Repeater1.DataSource = psvm.getAllPersonas();
            Repeater1.DataBind();

            if (Repeater1.Items.Count > 0)
            {
                Repeater1.Visible = true;
                emptyMsg.Visible = false;
            }
            else
            {
                Repeater1.Visible = false;
                emptyMsg.Visible = true;
            }
        }
    }
예제 #39
0
 protected void addProfesion_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addProfesion(new SCPM_PROFESIONES() { PROF_NOM = inProfesion.Text, PROF_EST = onProfesion.Checked }))
     {
         fillProfesion();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #40
0
 private void fillSectores()
 {
     psvm = new PersonaServiceModel();
     comboSector.Items.Clear();
     comboSector.AppendDataBoundItems = true;
     comboSector.DataSource = psvm.getSectorByParroquiaID(Convert.ToInt32(ComboParroquia.SelectedItem.Value));
     comboSector.DataTextField = "SEC_NOM";
     comboSector.DataValueField = "SEC_ID";
     comboSector.DataBind();
     if (comboSector.Items.Count > 0)
     {
         comboSector.Enabled = true;
         inSector.Text = "";
         comboSector_SelectedIndexChanged(comboSector, null);
     }
     else
     {
         comboSector.Enabled = false;
         comboSector.Items.Add(new ListItem("--Añadir--", ""));
     }
 }
예제 #41
0
 protected void editDocumento_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editDocumento(new SCPM_TIPO_IDENTIFICACIONES() { TIP_IDE_COD = Convert.ToInt32(comboDocumento.SelectedValue), TIP_IDE_NOM = inDocumento.Text, TIP_IDE_EST = onDocumento.Checked }))
     {
         fillDocumento();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #42
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillProvincias();

            //discapacidad
            fillDiscapacidad();

            //documento
            fillDocumento();

            //estado civil
            fillEstadoCivil();

            //comboProfesion
            fillProfesion();

            //comboParentesco
            fillPArentesco();

            //coboRaza
            fillRaza();

            //comboPais
            fillPais();

        }
    }
예제 #43
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillComboSangre();
            //comboPais
            fillPais(comboPais);

            //documento
            fillDocumento(comboDocumento);

            //coboRaza
            fillRaza(comboRaza);

            //estado civil
            fillEstadoCivil();

            //provincia
            fillProvincias();

            //conyugue
            //nacionalidad
            fillPais(con_pais);
            //documento
            fillDocumento(con_comboDocumento);
            //profesion
            fillProfesion(con_comboProfesion);

            //discapacidad
            //fill discapacidades
            Repeater1.DataSource = psvm.getAllDiscapacidadControl();
            Repeater1.DataBind();
            //fill parentexco
            fillParentesco(dis_comboParentesco);

            //emergencia
            fillParentesco(emg_comboParentesco);

            //inFechaNac.Text = DateTime.Now.ToString("yyyy-MM-dd");
            //con_fechaNacimiento.Text = DateTime.Now.ToString("yyyy-MM-dd");
        }
    }
예제 #44
0
    private void fillParroquias()
    {
        psvm = new PersonaServiceModel();
        ComboParroquia.Items.Clear();
        ComboParroquia.AppendDataBoundItems = true;
        ComboParroquia.DataSource = ComboCanton.SelectedItem.Value == "0" ? new List<SCPM_PARROQUIAS>() : psvm.getParroquiasByCanton(Convert.ToInt32(ComboCanton.SelectedItem.Value));
        ComboParroquia.DataTextField = "PAR_NOM";
        ComboParroquia.DataValueField = "PAR_ID";
        ComboParroquia.DataBind();
        if (ComboParroquia.Items.Count > 0)
        {
            ComboParroquia.Enabled = true;
            ComboParroquia.Items.Add(new ListItem("--Seleccionar--", "0"));
            ComboParroquia.SelectedValue = "0";

            ComboParroquia_SelectedIndexChanged(ComboParroquia, null);

        }
        else
        {
            ComboParroquia.Enabled = false;
            ComboParroquia.Items.Add(new ListItem("--Añadir--", ""));

            comboSector.Enabled = false;
            comboSector.Items.Add(new ListItem("--Añadir--", ""));
        }
    }
예제 #45
0
 protected void editProfesion_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editProfesion(new SCPM_PROFESIONES() { PROF_ID = Convert.ToInt32(comboProfesion.SelectedValue), PROF_NOM = inProfesion.Text, PROF_EST = onProfesion.Checked }))
     {
         fillProfesion();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #46
0
 protected void addRaza_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addRaza(new SCPM_RAZAS() { RAZ_NOM = inRaza.Text, RAZ_EST = onRaza.Checked }))
     {
         fillRaza();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #47
0
 protected void editParentesco_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editParentesco(new SCPM_PARENTESCOS() { PARE_ID = Convert.ToInt32(comboParentesco.SelectedValue), PARE_NOM = inParentesco.Text, PARE_EST = onParentesco.Checked }))
     {
         fillPArentesco();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #48
0
 protected void editPais_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editPais(new SCPM_PAIS() { PAI_ID = Convert.ToInt32(comboPais.SelectedValue), PAI_NACIONALIDAD = inPais.Text, PAI_EST = onPais.Checked }))
     {
         fillPais();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #49
0
 protected void editEstadoCivil_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editEstadoCivil(new SCPM_ESTADOS_CIVILES() { EST_CIV_ID = Convert.ToInt32(comboEstadoCivil.SelectedValue), EST_CIV_NOM = inEstadoCivil.Text, EST_CIV_EST = onEstadoCivil.Checked }))
     {
         fillEstadoCivil();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #50
0
    protected void addParroquia_Click(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();

        if (psvm.addParroquia(new SCPM_PARROQUIAS() { PAR_NOM = inParroquia.Text, PAR_EST = onParroquia.Checked }, Convert.ToInt32(ComboCanton.SelectedValue)))
        {
            fillParroquias();
            HelperUtil.showNotifi("añadido");
        }
        else
            HelperUtil.showNotifi("no añadido");
    }
예제 #51
0
 protected void addProvincia_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.addProvincia(new SCPM_PROVINCIAS() { PRO_NOM = inProvincia.Text, PRO_EST = onProvincia.Checked }))
     {
         fillProvincias();
         HelperUtil.showNotifi("añadido");
     }
     else
         HelperUtil.showNotifi("no añadido");
 }
예제 #52
0
 protected void editProvincia_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editProvincia(new SCPM_PROVINCIAS() { PRO_ID = Convert.ToInt32(comboProvincia.SelectedValue), PRO_NOM = inProvincia.Text, PRO_EST = onProvincia.Checked }))
     {
         fillProvincias();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #53
0
 protected void editDiscapacidad_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editDiscapacidad(new SCPM_TIPO_DISCAPACIDADES() { TIP_DIS_ID = Convert.ToInt32(comboDiscapacidad.SelectedValue), TIP_DIS_NOM = inDiscapacidad.Text, TIP_DIS_EST = onProvincia.Checked }))
     {
         fillDiscapacidad();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     persvm = new PersonaServiceModel();
     if (!IsPostBack) ReportViewer1.Visible = false;
 }
예제 #55
0
    protected void Page_Load(object sender, EventArgs e)
    {
        psvm = new PersonaServiceModel();
        if (!IsPostBack)
        {
            fillComboSangre();
            //comboPais
            fillPais(comboPais);

            //documento
            fillDocumento(comboDocumento);

            //coboRaza
            fillRaza(comboRaza);

            //estado civil
            fillEstadoCivil();

            //provincia
            fillProvincias();

            //conyugue
            //nacionalidad
            fillPais(con_pais);
            //documento
            fillDocumento(con_comboDocumento);
            //profesion
            fillProfesion(con_comboProfesion);

            //discapacidad
            //fill discapacidades
            Repeater1.DataSource = psvm.getAllDiscapacidadControl();
            Repeater1.DataBind();
            //fill parentexco
            fillParentesco(dis_comboParentesco);

            //emergencia
            fillParentesco(emg_comboParentesco);

            var _per_ID = Request.QueryString["per_id"];
            if (_per_ID != null)
            {
                int per_id;
                bool isNumeric = int.TryParse(_per_ID, out per_id);
                if (isNumeric)
                {
                    //fill personas
                    fillPersonaData(per_id);
                }
                else
                {
                    HelperUtil.showNotifi("persona no encontrada");
                }

            }
            else
            {
                HelperUtil.showNotifi("persona no encontrada");
            }
        }
    }
예제 #56
0
    private void fillCantones()
    {
        psvm = new PersonaServiceModel();
        ComboCanton.Items.Clear();
        ComboCanton.AppendDataBoundItems = true;
        ComboCanton.DataSource = comboProvincia.SelectedItem.Value == "0" ? new List<SCPM_CANTONES>() : psvm.getCantonesByProvincia(Convert.ToInt32(comboProvincia.SelectedItem.Value));
        ComboCanton.DataTextField = "CAN_NOM";
        ComboCanton.DataValueField = "CAN_ID";
        ComboCanton.DataBind();
        if (ComboCanton.Items.Count > 0)
        {
            ComboCanton.Enabled = true;
            ComboCanton.Items.Add(new ListItem("--Seleccionar--", "0"));
            ComboCanton.SelectedValue = "0";
            ComboCanton_SelectedIndexChanged(ComboCanton, null);

        }
        else
        {
            ComboCanton.Enabled = false;
            ComboCanton.Items.Add(new ListItem("--añadir--", ""));

            ComboParroquia.Enabled = false;
            ComboParroquia.Items.Add(new ListItem("--Añadir--", ""));

            comboSector.Enabled = false;
            comboSector.Items.Add(new ListItem("--Añadir--", ""));
        }
    }
예제 #57
0
 protected void editRaza_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editRaza(new SCPM_RAZAS() { RAZ_ID = Convert.ToInt32(coboRaza.SelectedValue), RAZ_NOM = inRaza.Text, RAZ_EST = onRaza.Checked }))
     {
         fillRaza();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }
예제 #58
0
    private void fillSectores()
    {
        psvm = new PersonaServiceModel();
        comboSector.Items.Clear();
        comboSector.AppendDataBoundItems = true;
        comboSector.DataSource = ComboParroquia.SelectedItem.Value == "0" ? new List<SCPM_SECTORES>() : psvm.getSectorByParroquiaID(Convert.ToInt32(ComboParroquia.SelectedItem.Value));
        comboSector.DataTextField = "SEC_NOM";
        comboSector.DataValueField = "SEC_ID";
        comboSector.DataBind();
        if (comboSector.Items.Count > 0)
        {
            comboSector.Enabled = true;

            comboSector.Items.Add(new ListItem("--Seleccionar--", "0"));
            comboSector.SelectedValue = "0";
        }
        else
        {
            comboSector.Enabled = false;
            comboSector.Items.Add(new ListItem("--Añadir--", ""));
        }
    }
예제 #59
0
 protected void editSector_Click(object sender, EventArgs e)
 {
     psvm = new PersonaServiceModel();
     if (psvm.editSector(new SCPM_SECTORES() { SEC_ID = Convert.ToInt32(comboSector.SelectedValue), SEC_NOM = inSector.Text, SEC_EST = onSector.Checked }, Convert.ToInt32(ComboParroquia.SelectedValue)))
     {
         fillSectores();
         HelperUtil.showNotifi("editado");
     }
     else
         HelperUtil.showNotifi("no editado");
 }