コード例 #1
0
        private void mostrarpanel()
        {
            pnlmecanico.Visible = false;
            pnlCliente.Visible  = false;

            switch (rdlOpciones.SelectedIndex)
            {
            default:
            case 0:
                pnlmecanico.Visible = true;

                try
                {
                    if (!objcontroles.llenarDrop(ddlmecanico))
                    {
                        objcontroles = null;
                        return;
                    }
                    if (!objcontroles.llenarDrop(ddlCarro))
                    {
                        objcontroles = null;
                        return;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                break;

            case 1:
                pnlCliente.Visible = true;

                try
                {
                    if (!objcontroles.llenarDrop(ddlvehiculo))
                    {
                        objcontroles = null;
                        return;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                break;
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Session["identificacion"].ToString() == string.Empty)
                {
                    Response.Redirect("frmlogin.aspx");
                }

                strnombreapp = Assembly.GetExecutingAssembly().GetName().Name + ".xml";
                objcontroles = new clsllenarope(strnombreapp);
            }
            catch (Exception ex)
            {
                mensajes("error", ex.Message);
            }
        }