示例#1
0
        protected void BTNEliminar_Click(object sender, EventArgs e)
        {
            if (txtIdetificacion.Text == "")
            {
                lbMensaje.Text = "Debe Ingresar Un Documento";
                txtIdetificacion.Focus();
                return;
            }

            if (!CADCitasUM.CADMedicos.ExisteMedico(txtIdetificacion.Text))
            {
                lbMensaje.Text = "El medico no existe base de datos........";
                txtIdetificacion.Focus();
                return;
            }

            lbMensaje.Text = CADCitasUM.CADMedicos.BorrarMedico(txtIdetificacion.Text);
            GridViewMedicos.DataBind();
            //limpiamos todos los campos.................
            txtIdetificacion.Text = "";
            txtNombre.Text        = "";
            txtApellidos.Text     = "";
            txtDireccion.Text     = "";
            txtEmail.Text         = "";
            txtTelefono.Text      = "";
            txtIdetificacion.Focus();
        }
        public void MostrarMedicos()
        {
            DataSet Dts = new DataSet();

            Dts = Ws.GetListaMedicos("", "", "", "", "", "S");
            GridViewMedicos.DataSource = Dts;
            GridViewMedicos.DataBind();
            Cargar_Nif();
        }
示例#3
0
        protected void BTNNuevo_Click(object sender, EventArgs e)
        {
            if (txtIdetificacion.Text == "")
            {
                lbMensaje.Text = "Debe Ingresar Un Documento";
                txtIdetificacion.Focus();
                return;
            }

            if (CADCitasUM.CADMedicos.ExisteMedico(txtIdetificacion.Text))
            {
                lbMensaje.Text = "El medico ya Existe en la base de datos........";
                txtIdetificacion.Focus();
                return;
            }



            if (txtNombre.Text == "")
            {
                lbMensaje.Text = "Debe Ingresar Un Nombre";
                txtNombre.Focus();
                return;
            }

            if (txtApellidos.Text == "")
            {
                lbMensaje.Text = "Debe Ingresar El Apellido";
                txtApellidos.Focus();
                return;
            }



            if (txtTelefono.Text == "")
            {
                lbMensaje.Text = "Debes Ingresar Un Telefono";
                txtTelefono.Focus();
                return;
            }
            lbMensaje.Text = CADCitasUM.CADMedicos.NuevoMedico(Convert.ToInt32(cmbTipoIdentificacion.SelectedValue), txtIdetificacion.Text, txtNombre.Text, txtApellidos.Text, CalendarFN.SelectedDate, Convert.ToInt32(cmbSexo.SelectedValue), txtDireccion.Text, txtTelefono.Text, txtEmail.Text, Convert.ToInt32(cmbEspecialidad.SelectedValue), Convert.ToInt32(cmbHorario.SelectedValue));
            //actualizamos la cuadricula de medicos
            GridViewMedicos.DataBind();
            txtIdetificacion.Text = "";
            txtNombre.Text        = "";
            txtApellidos.Text     = "";
            txtDireccion.Text     = "";
            txtEmail.Text         = "";
            txtTelefono.Text      = "";
            txtIdetificacion.Focus();
        }