示例#1
0
        protected void btnEliminarDoc_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtIdDoc.Text.Length == 0)
                {
                    txtIdDoc.Text = "0";
                }

                ds = wcf.BorrarDoc(int.Parse(txtIdDoc.Text));

                if (ds != null)
                {
                    txtIdDoc.Text       = "";
                    txtNombreDoc.Text   = "";
                    txtApellidoDoc.Text = "";
                    txtTelCelDOC.Text   = "";
                    txtEmailDoc.Text    = "";
                    DropDownREspecialidad.ClearSelection();
                    DropDownRUsuario.ClearSelection();
                    lblMensaje.Text = "Eliminado";
                }
                else
                {
                    lblMensaje.Text = "Error en la consulta!";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text = ex.Message;
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                User = wcf.ListarUsuario();
                DropDownRUsuario.DataSource     = User.Tables[0];
                DropDownRUsuario.DataValueField = User.Tables[0].Columns[0].ColumnName;
                DropDownRUsuario.DataTextField  = User.Tables[0].Columns[1].ColumnName;
                DropDownRUsuario.DataBind();

                Espec = wcf.ListarEspecialidad();
                DropDownREspecialidad.DataSource     = Espec.Tables[0];
                DropDownREspecialidad.DataValueField = Espec.Tables[0].Columns[0].ColumnName;
                DropDownREspecialidad.DataTextField  = Espec.Tables[0].Columns[1].ColumnName;
                DropDownREspecialidad.DataBind();
            }
        }