コード例 #1
0
    private void GridView()
    {
        ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();

        GridView1.DataSource = ObjExamesComplementaresDAL.SelectAll(txtExame.Text);
        GridView1.DataBind();
    }
コード例 #2
0
 private void Editar(int id)
 {
     ExamesComplementares ObjExamesComplementares = new ExamesComplementares();
     ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
     ObjExamesComplementares = ObjExamesComplementaresDAL.SelectByID(id);
     txtTipoExame.Text = ObjExamesComplementares.Descricao;
 }
コード例 #3
0
    private void Editar(int id)
    {
        ExamesComplementares    ObjExamesComplementares    = new ExamesComplementares();
        ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();

        ObjExamesComplementares = ObjExamesComplementaresDAL.SelectByID(id);
        txtTipoExame.Text       = ObjExamesComplementares.Descricao;
    }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
         ddlExamesComplementares.DataSource     = ObjExamesComplementaresDAL.DropDownlist();
         ddlExamesComplementares.DataTextField  = "Descricao";
         ddlExamesComplementares.DataValueField = "Id";
         ddlExamesComplementares.DataBind();
         ddlExamesComplementares.Items.Insert(0, new ListItem("<--Selecione-->", string.Empty)); //Texto Inicial do combo
     }
 }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
         ddlExamesComplementares.DataSource = ObjExamesComplementaresDAL.DropDownlist();
         ddlExamesComplementares.DataTextField = "Descricao";
         ddlExamesComplementares.DataValueField = "Id";
         ddlExamesComplementares.DataBind();
         ddlExamesComplementares.Items.Insert(0, new ListItem("<--Selecione-->", string.Empty)); //Texto Inicial do combo
     }
 }
コード例 #6
0
ファイル: Default.aspx.cs プロジェクト: danygolden/gianfratti
 private void Deletar(int id)
 {
     try
     {
         ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
         ObjExamesComplementaresDAL.Delete(id);
         GridView();
     }
     catch (Exception)
     {
         Page.ClientScript.RegisterClientScriptBlock(GetType(), "Mensage", "alert('Este exame não pode ser apagado')", true);
     }
 }
コード例 #7
0
 private void Deletar(int id)
 {
     try
     {
         ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
         ObjExamesComplementaresDAL.Delete(id);
         GridView();
     }
     catch (Exception)
     {
         Page.ClientScript.RegisterClientScriptBlock(GetType(), "Mensage", "alert('Este exame não pode ser apagado')", true);
     }
 }
コード例 #8
0
 protected void btnSalvar_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtTipoExame.Text != "")
         {
             ExamesComplementares Obj = new ExamesComplementares();
             Obj.id        = Convert.ToInt32(Request.QueryString["id"]);
             Obj.Descricao = txtTipoExame.Text;
             ExamesComplementaresDAL ObjDAL = new ExamesComplementaresDAL();
             ObjDAL.InsertUpdate(Obj);
             Response.Redirect("default.aspx");
         }
         else
         {
             Page.ClientScript.RegisterClientScriptBlock(GetType(), "Mensage", "alert('Campo Obrigatório')", true);
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex);
     }
 }
コード例 #9
0
    protected void btnSalvar_Click(object sender, EventArgs e)
    {
        try
        {
        if (txtTipoExame.Text != "")
        {

            ExamesComplementares Obj = new ExamesComplementares();
            Obj.id = Convert.ToInt32(Request.QueryString["id"]);
            Obj.Descricao = txtTipoExame.Text;
            ExamesComplementaresDAL ObjDAL = new ExamesComplementaresDAL();
            ObjDAL.InsertUpdate(Obj);
            Response.Redirect("default.aspx");
        }
        else
        {
            Page.ClientScript.RegisterClientScriptBlock(GetType(), "Mensage", "alert('Campo Obrigatório')", true);
        }
        }
        catch (Exception ex)
        {
            Response.Write(ex);
        }
    }
コード例 #10
0
    //USADO PARA POPULAR UM POPULAR UM DataTable
    public DataTable DataTable()
    {
        ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();

        return(ObjExamesComplementaresDAL.DataTable());
    }
コード例 #11
0
ファイル: Default.aspx.cs プロジェクト: danygolden/gianfratti
 private void GridView()
 {
     ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
     GridView1.DataSource = ObjExamesComplementaresDAL.SelectAll(txtExame.Text);
     GridView1.DataBind();
 }
コード例 #12
0
 //USADO PARA POPULAR UM POPULAR UM DataTable
 public DataTable DataTable()
 {
     ExamesComplementaresDAL ObjExamesComplementaresDAL = new ExamesComplementaresDAL();
     return ObjExamesComplementaresDAL.DataTable();
 }