Ejemplo n.º 1
0
        //MY METHODS_EVENTS_ACTIONS-CLIENTES- TAB1-PEDIDOS
        private void my_bt_Novo_tab1_Click(object sender, EventArgs e)
        {
            var orderApp = new myOrderAplication();

            my_txt_NumeroPedido_tab1.Text      = orderApp.Method_APP_Select_NewId().ToString();
            my_gbx_ConsultaClient_tab1.Enabled = true;
            my_gbx_Observacoes_tab1.Enabled    = true;
            my_bt_Buscar_consultacliente_tab1.Focus();
        }
Ejemplo n.º 2
0
        //MY METHODS_UI - ORDER

        private void Method_UI_ClearGrid_Order_tab1()
        {
            this.my_DataGridView_Pedido_tab1.AutoGenerateColumns = false;
            var orderApp = new myOrderAplication();

            this.my_DataGridView_Pedido_tab1.DataSource = orderApp.Method_APP_ResetList();
            this.my_DataGridView_Pedido_tab1.ClearSelection();
            this.my_DataGridView_Pedido_tab1.Enabled = false;
        }
Ejemplo n.º 3
0
        //MY METHODS_EVENTS_ACTIONS-PEDIDOS-TAB4-HISTORICO DE PEDIDOS
        private void my_bt_Buscar_consultapedido_tab4_Click(object sender, EventArgs e)
        {
            my_DataGridView_Pedidos_tab4.AutoGenerateColumns = false;
            var orderApp = new myOrderAplication();

            my_DataGridView_Pedidos_tab4.Enabled    = true;
            my_DataGridView_Pedidos_tab4.DataSource = orderApp.Method_APP_SelectAll();
            //my_DataGridView_Pedidos_tab4.ClearSelection();
            Method_UI_SetCountSelecRow_Client_tab4(orderApp.Method_APP_SelectAll().Count);
        }
Ejemplo n.º 4
0
        private void my_bt_Adicionar_Pedido_tb1_Click(object sender, EventArgs e)
        {
            Method_UI_AddForListOrder_Food();
            Method_UI_SetCountSelecRow_Order_tab1(my_DataGridView_Pedido_tab1.Rows.Count);
            //REFRESH SELECAO GRID
            my_DataGridView_Prato_tab1.ClearSelection();
            my_DataGridView_Pedido_tab1.ClearSelection();
            my_bt_Adicionar_Pedido_tab1.Enabled = false;
            //CALC SUM PRICE FOR LABEL
            var orderApp = new myOrderAplication();

            my_lb_Custo_Pedido_tab1.Text = string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:#,###.##}", orderApp.Method_APP_CalcSumPrice(Method_UI_CreateListId_Food()).ToString());
        }
Ejemplo n.º 5
0
        private void my_bt_Remove_pedido_tab1_Click(object sender, EventArgs e)
        {
            my_DataGridView_Pedido_tab1.Rows.RemoveAt(my_DataGridView_Pedido_tab1.CurrentRow.Index);
            //REFRESH CONTADOR DE LINHAS
            Method_UI_SetCountSelecRow_Order_tab1(my_DataGridView_Pedido_tab1.Rows.Count);
            //REFRESH SELECAO DE LINHAS
            my_DataGridView_Pedido_tab1.ClearSelection();
            my_bt_Remove_Pedido_tab1.Enabled = false;
            //CALC SUM PRICE FOR LABEL
            var orderApp = new myOrderAplication();

            my_lb_Custo_Pedido_tab1.Text = orderApp.Method_APP_CalcSumPrice(Method_UI_CreateListId_Food()).ToString();
        }
Ejemplo n.º 6
0
        private void Method_UI_Finish_Order()
        {
            var orderApp = new myOrderAplication();

            if (MessageBox.Show("Sim ou Não", "Deseja finalizar esse pedido?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)
            {
                int    idClient = Convert.ToInt32(my_txt_Cod_selecionadocliente_tab1.Text);
                string note     = my_txt_Observacoes_Pedido_tab1.Text.ToString();
                double price    = orderApp.Method_APP_CalcSumPrice(Method_UI_CreateListId_Food());
                orderApp.Method_APP_Insert_Order(idClient, note, price, Method_UI_CreateListId_Food());

                Method_UI_Cancel_Order();
            }
        }