Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Login"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            ControlCliente = (C_Cliente)Session["ControlCliente"];
            ControlConfig  = (C_Configuracion)Session["ControlConfig"];


            if (!IsPostBack)
            {
                BusquedaCliente.PageSize = ControlConfig.DevolverNroMaxPaginacion();
                RefrecarBusqueda();
            }
            if (RadioApellido.Checked)
            {
                TxtBuscarApellido.Visible                 = true;
                BtnBuscarApellido.Visible                 = true;
                TxtBuscarRSocial.Visible                  = false;
                BtnBuscarRSocial.Visible                  = false;
                TxtBuscarcuil.Visible                     = false;
                BntBuscarCuil.Visible                     = false;
                DropTipo.Visible                          = false;
                BtnBuscarTipo.Visible                     = false;
                PanelPopUp.Attributes["display"]          = "none";
                MensajeConfirmacion.Attributes["display"] = "none";
                TxtBuscarApellido.Focus();
            }
            else
            {
                if (RadioRSocial.Checked)
                {
                    TxtBuscarApellido.Visible                 = false;
                    BtnBuscarApellido.Visible                 = false;
                    TxtBuscarRSocial.Visible                  = true;
                    BtnBuscarRSocial.Visible                  = true;
                    TxtBuscarcuil.Visible                     = false;
                    BntBuscarCuil.Visible                     = false;
                    DropTipo.Visible                          = false;
                    BtnBuscarTipo.Visible                     = false;
                    PanelPopUp.Attributes["display"]          = "none";
                    MensajeConfirmacion.Attributes["display"] = "none";
                    TxtBuscarRSocial.Focus();
                }
                else
                {
                    if (RadioTipo.Checked)
                    {
                        TxtBuscarApellido.Visible                 = false;
                        BtnBuscarApellido.Visible                 = false;
                        TxtBuscarRSocial.Visible                  = false;
                        BtnBuscarRSocial.Visible                  = false;
                        DropTipo.Visible                          = true;
                        BtnBuscarTipo.Visible                     = true;
                        TxtBuscarcuil.Visible                     = false;
                        BntBuscarCuil.Visible                     = false;
                        PanelPopUp.Attributes["display"]          = "none";
                        MensajeConfirmacion.Attributes["display"] = "none";
                    }
                    else
                    {
                        TxtBuscarApellido.Visible                 = false;
                        BtnBuscarApellido.Visible                 = false;
                        TxtBuscarRSocial.Visible                  = false;
                        BtnBuscarRSocial.Visible                  = false;
                        DropTipo.Visible                          = false;
                        BtnBuscarTipo.Visible                     = false;
                        TxtBuscarcuil.Visible                     = true;
                        BntBuscarCuil.Visible                     = true;
                        PanelPopUp.Attributes["display"]          = "none";
                        MensajeConfirmacion.Attributes["display"] = "none";
                        TxtBuscarcuil.Focus();
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Login"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            ControlProveedor = (C_Proveedor)Session["ControlProveedor"];
            ControlConfig    = (C_Configuracion)Session["ControlConfig"];

            if (!IsPostBack)
            {
                TodosProveedores.PageSize = ControlConfig.DevolverNroMaxPaginacion();
                RefrecarBusqueda();
            }

            if (RadioButtonListBusqueda.SelectedValue == "Cuit")
            {
                TxtBuscarApellido.Visible  = false;
                BtnBuscarApellido.Visible  = false;
                TxtBuscarCuit.Visible      = true;
                BtnBuscarCuit.Visible      = true;
                TxtBuscarNFantasia.Visible = false;
                BtnBuscarNFantasia.Visible = false;
                TxtBuscarRSocial.Visible   = false;
                BtnBuscarRSocial.Visible   = false;
                TxtBuscarCuit.Focus();
            }
            else
            {
                if (RadioButtonListBusqueda.SelectedValue == "Apellido")
                {
                    TxtBuscarApellido.Visible  = true;
                    BtnBuscarApellido.Visible  = true;
                    TxtBuscarCuit.Visible      = false;
                    BtnBuscarCuit.Visible      = false;
                    TxtBuscarNFantasia.Visible = false;
                    BtnBuscarNFantasia.Visible = false;
                    TxtBuscarRSocial.Visible   = false;
                    BtnBuscarRSocial.Visible   = false;
                    TxtBuscarApellido.Focus();
                }
                else
                {
                    if (RadioButtonListBusqueda.SelectedValue == "NombredeFantasia")
                    {
                        TxtBuscarApellido.Visible  = false;
                        BtnBuscarApellido.Visible  = false;
                        TxtBuscarCuit.Visible      = false;
                        BtnBuscarCuit.Visible      = false;
                        TxtBuscarNFantasia.Visible = true;
                        BtnBuscarNFantasia.Visible = true;
                        TxtBuscarRSocial.Visible   = false;
                        BtnBuscarRSocial.Visible   = false;
                        TxtBuscarNFantasia.Focus();
                    }
                    else
                    {
                        TxtBuscarApellido.Visible  = false;
                        BtnBuscarApellido.Visible  = false;
                        TxtBuscarCuit.Visible      = false;
                        BtnBuscarCuit.Visible      = false;
                        TxtBuscarNFantasia.Visible = false;
                        BtnBuscarNFantasia.Visible = false;
                        TxtBuscarRSocial.Visible   = true;
                        BtnBuscarRSocial.Visible   = true;
                        TxtBuscarRSocial.Focus();
                    }
                }
            }
        }