Exemple #1
0
        public void GuardarGestionVentas()
        {
            try
            {
                LView.GetItemGestionVentas();
                if (Item != null && Item.ItemGestionVentas != null)
                {
                    if (Item.ItemGestionVentas.Validar())
                    {
                        if (Client.SaveGestionVentas(Item.ItemGestionVentas))
                        {
                            Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeSatisfactorio(Title, "Se ha guardado satisfactoriamente");

                            if (Item.ItemGestionVentas.Instance == Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added)
                            {
                                Item.ListGestionVentas.Insert(0, Item.ItemGestionVentas);
                            }
                            LView.ShowGestionesProspecto();
                            LView.SetItemGestionVentas();
                            LView.HabilitarDatosGestionVentas(false);
                        }
                        else
                        {
                            Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "Ha ocurrido un error al guardar el item.");
                        }
                    }
                    else
                    {
                        LView.ShowValidation();
                    }
                }
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.SavePresenter, ex); }
        }
Exemple #2
0
        public void NuevaGestionVentas()
        {
            try
            {
                if (Item != null)
                {
                    LView.ClearItemGestionVentas();
                    Item.ItemGestionVentas                   = new GestionVentas();
                    Item.ItemGestionVentas.EMPR_Codigo       = Controls.Entorno.ItemEmpresa.EMPR_Codigo;
                    Item.ItemGestionVentas.SUCR_Codigo       = Controls.Entorno.ItemSucursal.SUCR_Codigo;
                    Item.ItemGestionVentas.GEST_Fecha        = Session.Fecha;
                    Item.ItemGestionVentas.PROS_codigo       = Item.PROS_codigo;
                    Item.ItemGestionVentas.ENTC_CodCliente   = Item.ENTC_CodCliente;
                    Item.ItemGestionVentas.ENTC_CodEjecutivo = ItemEjecutivo.ENTC_Codigo;
                    Item.ItemGestionVentas.AUDI_UsrCrea      = Session.UserName;
                    Item.ItemGestionVentas.AUDI_FecCrea      = Session.Fecha;
                    Item.ItemGestionVentas.Instance          = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added;

                    LView.SetItemGestionVentas();
                    LView.HabilitarDatosGestionVentas(true);
                }
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); }
        }
Exemple #3
0
 public void EditarGestionVentas()
 {
     try
     {
         if (Item != null && Item.ItemGestionVentas != null)
         {
             LView.ClearItemGestionVentas();
             Item.ItemGestionVentas.AUDI_UsrMod = Session.UserName;
             Item.ItemGestionVentas.AUDI_FecMod = Session.Fecha;
             Item.ItemGestionVentas.Instance    = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Modified;
             LView.SetItemGestionVentas();
             LView.HabilitarDatosGestionVentas(true);
         }
     }
     catch (Exception ex)
     { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); }
 }