예제 #1
0
        protected void bntEliminar_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtIdCITA.Text.Length == 0)
                {
                    txtIdCITA.Text = "0";
                }

                ds = wcf.BorrarCita(int.Parse(txtIdCITA.Text));

                if (ds != null)
                {
                    txtIdCITA.Text     = "";
                    txtCalendario.Text = "";
                    txtHoraCita.Text   = "";
                    DropDownNombreDoc.ClearSelection();
                    txtIdPaciente0.Text = "";


                    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)
 {
     ddl = wcf.Rollist();
     DropDownNombreDoc.DataSource     = ddl.Tables[0];
     DropDownNombreDoc.DataValueField = ddl.Tables[0].Columns[0].ColumnName;
     DropDownNombreDoc.DataTextField  = ddl.Tables[0].Columns[1].ColumnName;
     DropDownNombreDoc.DataBind();
 }