示例#1
0
 private void LoadProducts()
 {
     try{
         var usecase = OrderUseCase.CreateUseCase();
         Data.DataSource = null;
         Data.DataSource = onlyLoad
             ? usecase.GetOnlyGenerateProposeProduct(idSelected)
             : usecase.GetGenerateProposeProduct(idSelected);
         ConfigureProductGrid();
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message, "Atención", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#2
0
 private void LoadOrderDetail(string orderId)
 {
     try{
         var usecase = OrderUseCase.CreateUseCase();
         ProductDataGridView.DataSource = null;
         ProductDataGridView.DataSource = usecase.GetOrderDetailById(orderId);
         var            configurator = DataGridViewConfigurator.CreateConfigurator(ProductDataGridView);
         IList <string> columns      = new List <string> {
             "id", "id_pedido"
         };
         configurator.HideColumns(columns);
         configurator.NumericIntegerColumn("Cantidad", "Cantidad solicitada");
     }
     catch (Exception ex) {
         ProductDataGridView.DataSource = null;
         MessageBox.Show(ex.Message, "Atención", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
        private bool AceptPropose()
        {
            bool result;

            try{
                var usecase = OrderUseCase.CreateUseCase();
                usecase.AceptProposeProducts(IdSelected);
                const string message = "Los productos propuestos han sido aceptados.";
                MessageBox.Show(message, "Atención", MessageBoxButtons.OK, MessageBoxIcon.Information);
                result = true;
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message, "Atención", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                result = false;
            }

            return(result);
        }
示例#4
0
 private void LoadOrders(int filterType)
 {
     try{
         var usecase = OrderUseCase.CreateUseCase();
         ListDataGridView.DataSource = null;
         ListDataGridView.DataSource = usecase.GetOrderByStatus(filterType + 1, profile.ProfileId);
         var            configurator = DataGridViewConfigurator.CreateConfigurator(ListDataGridView);
         IList <string> columns      = new List <string> {
             "id_pedido", "id_cliente", "id_estado", "id_condicion", "Condicion pago", "id_rol",
             "estado_subasta", "empresa", "dir", "fono", "observacion"
         };
         configurator.HideColumns(columns);
         configurator.ChangeHeader("Observacion", "Observación");
         configurator.NumericColumn("Descuento", "Descuento");
         DisplayCounts();
     }
     catch (Exception ex) {
         ListDataGridView.DataSource = null;
         MessageBox.Show(ex.Message, "Atención", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }