Beispiel #1
0
        private void LlenarDetallePedido(int PedidoID)
        {
            try
            {
                DataSet       cdsDatos      = detallePedidoDS1;
                BindingSource cbsDataSource = spDetallePedidoBindingSource;
                string        cDataSetDatos = "spDetallePedido";
                cdsDatos.Clear();

                //Lenamos el DS de Categorias

                Params.Clear();

                DataModule.ParamByName(Params, "PedidoID", PedidoID);
                DataModule.FillDataSet(cdsDatos, cDataSetDatos, Params.ToArray());
                gvDetallePedido.BestFitColumns(false);
                //if (gvDetallePedido.DataRowCount > 0)
                //{
                //    IEnumerable<DataRow> query = from dts in detallePedidoDS1.Tables["spDetallePedido"].AsEnumerable() select dts;
                //    foreach (DataRow dr in query)
                //    {
                //        CalcularTotales(dr.Field<int>("ProductoID"));
                //    }
                //    gvDetallePedido.UpdateTotalSummary();

                //}
                gvDetallePedido.UpdateTotalSummary();
                ButtonGenerarRecibo();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void LlenarBusquedaPedido(string Datos)
        {
            try
            {
                //cdsDatos = spPedidoDS1;
                DataSource         = spPedidoBindingSource;
                NombreDataSetDatos = "spPedido";
                cdsDatos.Clear();

                //Lenamos el DS de Categorias

                Params.Clear();

                DataModule.ParamByName(Params, "Datos", Datos);
                DataModule.FillDataSet(cdsDatos, NombreDataSetDatos, Params.ToArray());
                gvPedido.BestFitColumns(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #3
0
        private void LlenarDetallePedido(int PedidoID)
        {
            try
            {
                cdsDatos           = detallePedidoDS1;
                DataSource         = spDetallePedidoBindingSource;
                NombreDataSetDatos = "spDetallePedido";
                cdsDatos.Clear();

                //Lenamos el DS de Categorias

                Params.Clear();

                DataModule.ParamByName(Params, "PedidoID", PedidoID);
                DataModule.FillDataSet(cdsDatos, NombreDataSetDatos, Params.ToArray());
                gvDetallePedido.BestFitColumns(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }