示例#1
0
        private void button3_Click(object sender, EventArgs e)
        {
            CAMADAS.MODEL.Itens item     = new CAMADAS.MODEL.Itens();
            CAMADAS.BLL.Itens   bllItens = new CAMADAS.BLL.Itens();
            item.id          = Convert.ToInt32(lblItemID.Text);
            item.aluguel_id  = Convert.ToInt32(lblAluID.Text);
            item.cacambas_id = Convert.ToInt32(txtCacambaID.Text);
            item.entrega     = Convert.ToDateTime("1/1/1900");

            bllItens.Insert(item);
            dgvItens.DataSource = bllItens.SelectByAlu(Convert.ToInt32(lblAluID.Text));
        }
示例#2
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (lblItemID.Text != "-1" && dtpEntrega.Value == Convert.ToDateTime("1/1/1900"))
            {
                CAMADAS.BLL.Itens   bllItens = new CAMADAS.BLL.Itens();
                CAMADAS.MODEL.Itens item     = new CAMADAS.MODEL.Itens();
                item.id          = Convert.ToInt32(lblItemID.Text);
                item.aluguel_id  = Convert.ToInt32(lblAluID.Text);
                item.cacambas_id = Convert.ToInt32(txtCacambaID.Text);

                bllItens.Devolver(item);

                dgvItens.DataSource = bllItens.SelectByAlu(item.aluguel_id);
            }
        }