Example #1
0
        protected void Desplegar_DATOS_PROVEEDOR()
        {
            DB_AP_InscripcionProv insp = new DB_AP_InscripcionProv();
            AP_InscripcionProv    ip   = new AP_InscripcionProv();

            ip             = insp.DB_Buscar_INSCRPCION_PROV(Convert.ToInt32(LblIdInsProv.Text));
            LblProg.Text   = ip.Programa;
            LblIdCamp.Text = (ip.Id_Campanhia).ToString();
            LblIdReg.Text  = (ip.Id_Regional).ToString();
            DB_AP_Proveedor p    = new DB_AP_Proveedor();
            AP_Proveedor    prov = new AP_Proveedor();

            prov = p.DB_Buscar_PROVEEDOR(Convert.ToString(ip.Id_Proveedor));
            LblProveedor.Text = prov.Razon_Social;
            DB_AP_Campanhia InsCamp = new DB_AP_Campanhia();
            AP_Campanhia    camp    = new AP_Campanhia();

            camp         = InsCamp.DB_Buscar_CAMPANHIA(Convert.ToInt32(LblIdCamp.Text));
            LblCamp.Text = camp.Nombre;
            DB_Regional insreg = new DB_Regional();
            DataTable   dt     = new DataTable();

            dt = insreg.DB_Seleccionar_REGIONAL(Convert.ToInt32(LblIdReg.Text));
            LblRegional.Text = dt.Rows[0][1].ToString();
        }
        private void Desplegar_REGIONAL()
        {
            DB_Regional reg = new DB_Regional();
            DataTable   dt  = new DataTable();

            dt             = reg.DB_Seleccionar_REGIONAL(Convert.ToInt32(DDLRegional.SelectedValue));
            LblRegion.Text = dt.Rows[0][7].ToString();
        }
Example #3
0
        protected void Seleccionar_REGION()
        {
            DB_Regional reg = new DB_Regional();
            DataTable   dt  = new DataTable();

            dt          = reg.DB_Seleccionar_REGIONAL(Convert.ToInt32(DDLRegional.SelectedValue));
            LblReg.Text = dt.Rows[0][7].ToString();
            Llenar_DDLCAMPANHIA(dt.Rows[0][7].ToString());
        }
        private void Mostrar_ENCABEZADO()
        {
            DB_Regional     reg  = new DB_Regional();
            AP_Campanhia    camp = new AP_Campanhia();
            DB_AP_Campanhia c    = new DB_AP_Campanhia();
            DataTable       dt   = new DataTable();

            camp             = c.DB_Buscar_CAMPANHIA(Convert.ToInt32(LblIdCamp.Text));
            LblCamp.Text     = camp.Nombre;
            dt               = reg.DB_Seleccionar_REGIONAL(Convert.ToInt32(LblIdReg.Text));
            LblRegional.Text = dt.Rows[0][1].ToString();
        }
        private void Llenar_DDLCAMPANHIA()
        {
            DB_AP_Campanhia cam = new DB_AP_Campanhia();
            DB_Regional     reg = new DB_Regional();
            DataTable       dt  = new DataTable();

            dt = reg.DB_Seleccionar_REGIONAL(Convert.ToInt32(DDLRegional.SelectedValue));
            string aux = dt.Rows[0][7].ToString();

            dt = cam.DB_Seleccionar_CAMPANHIA_REG(aux, "INICIADO");
            DDLCamp.DataSource     = dt;
            DDLCamp.DataValueField = "Id_Campanhia";
            DDLCamp.DataTextField  = "Nombre";
            DDLCamp.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             LblEstado.Text     = Session["Estado"].ToString();
             LblIdRegional.Text = Session["IdRegional"].ToString();
             Desplegar_CATEGORIAS();
             Desplegar_INMEDIATO_SUP();
             Desplegar_ROLES();
             if (LblEstado.Text == "Modificar")
             {
                 //**luis.rojas
                 Enabled_Actualizar(false);
                 //**
                 TxtCedula.Text = Session["ci"].ToString();
                 Buscar_PERSONA(TxtCedula.Text);
                 this.lbltitulo.Text = "MODIFICACION DE DATOS DEL USUARIO";
             }
             else
             {
                 TxtCedula.Text = string.Empty;
                 DB_Regional reg = new DB_Regional();
                 DataTable   dt  = new DataTable();
                 dt = reg.DB_Seleccionar_REGIONAL(Convert.ToInt32(LblIdRegional.Text));
                 LblRegional.Text    = dt.Rows[0][1].ToString();
                 this.lbltitulo.Text = "REGISTRO DE NUEVO USUARIO";
                 //Desplegar_CATEGORIAS();
                 //Desplegar_INMEDIATO_SUP();
                 //Desplegar_ROLES();
             }
         }
     }
     catch (Exception ex)
     {
         string script = @"<script type='text/javascript'>alert('{0}');</script>";
         script = string.Format(script, ex.Message);
         ScriptManager.RegisterStartupScript(this, typeof(Page), "alerta", script, false);
         //Response.Redirect("~/About.aspx");
     }
     //this.BtnRegistrar.Attributes.Add("onClick", "if(!confirm('Esta seguro de resetar su clave?')){return false;};");
 }