Esempio n. 1
0
 public ECMP_OrdenCompra(object DataGridSelectedItem, TipoConstructor MyTipoConstructor)
 {
     if (MyTipoConstructor == TipoConstructor.Insert || DataGridSelectedItem == null)
     {
         this.Opcion       = "I";
         this.Fecha        = DateTime.Now;
         this.FechaEntrega = DateTime.Now;
         this.TipoCambio   = 1;
         this.Serie        = string.Empty;
         this.Numero       = string.Empty;
     }
     else
     {
         if (DataGridSelectedItem is ECMP_OrdenCompra)
         {
             var ObjECMP_OrdenCompra = (ECMP_OrdenCompra)DataGridSelectedItem;
             this.Opcion                   = (MyTipoConstructor == TipoConstructor.Update) ? "U" : "D";
             this.IdOrdenCompra            = ObjECMP_OrdenCompra.IdOrdenCompra;
             this.ObjESGC_EmpresaSucursal  = ObjECMP_OrdenCompra.ObjESGC_EmpresaSucursal;
             this.ObjEMNF_ClienteProveedor = ObjECMP_OrdenCompra.ObjEMNF_ClienteProveedor;
             this.ObjEALM_Almacen          = ObjECMP_OrdenCompra.ObjEALM_Almacen;
             this.ObjESGC_Moneda           = ObjECMP_OrdenCompra.ObjESGC_Moneda;
             this.ObjESGC_Estado           = ObjECMP_OrdenCompra.ObjESGC_Estado;
             this.ObjESGC_FormaPago        = ObjECMP_OrdenCompra.ObjESGC_FormaPago;
             this.ObjESGC_Documento        = ObjECMP_OrdenCompra.ObjESGC_Documento;
             this.Periodo                  = ObjECMP_OrdenCompra.Periodo;
             this.Fecha        = ObjECMP_OrdenCompra.Fecha;
             this.Serie        = ObjECMP_OrdenCompra.Serie;
             this.Numero       = ObjECMP_OrdenCompra.Numero;
             this.TipoCambio   = ObjECMP_OrdenCompra.TipoCambio;
             this.Gravada      = ObjECMP_OrdenCompra.Gravada;
             this.Exonerada    = ObjECMP_OrdenCompra.Exonerada;
             this.IGV          = ObjECMP_OrdenCompra.IGV;
             this.ImporteIGV   = ObjECMP_OrdenCompra.ImporteIGV;
             this.IncluyeIGV   = ObjECMP_OrdenCompra.IncluyeIGV;
             this.FechaEntrega = ObjECMP_OrdenCompra.FechaEntrega;
             this.LugarEntrega = ObjECMP_OrdenCompra.LugarEntrega;
             this.Creacion     = ObjECMP_OrdenCompra.Creacion;
             this.Aprobacion   = ObjECMP_OrdenCompra.Aprobacion;
         }
     }
 }
Esempio n. 2
0
 public ECMP_OrdenServicio(object DataGridSelectedItem, TipoConstructor MyTipoConstructor)
 {
     if (MyTipoConstructor == TipoConstructor.Insert || DataGridSelectedItem == null)
     {
         this.Opcion      = "I";
         this.Fecha       = DateTime.Now;
         this.FechaInicio = DateTime.Now;
         this.FechaFin    = DateTime.Now;
         this.TipoCambio  = 1;
         this.Exonerado   = 11;
     }
     else
     {
         if (DataGridSelectedItem is ECMP_OrdenServicio)
         {
             var ObjECMP_OrdenServicio = (ECMP_OrdenServicio)DataGridSelectedItem;
             this.Opcion                   = (MyTipoConstructor == TipoConstructor.Update) ? "U" : "D";
             this.IdOrdenServicio          = ObjECMP_OrdenServicio.IdOrdenServicio;
             this.ObjESGC_EmpresaSucursal  = ObjECMP_OrdenServicio.ObjESGC_EmpresaSucursal;
             this.ObjESGC_Area             = ObjECMP_OrdenServicio.ObjESGC_Area;
             this.ObjEMNF_ClienteProveedor = ObjECMP_OrdenServicio.ObjEMNF_ClienteProveedor;
             this.ObjEMNF_TipoDestino      = ObjECMP_OrdenServicio.ObjEMNF_TipoDestino;
             this.ObjESGC_FormaPago        = ObjECMP_OrdenServicio.ObjESGC_FormaPago;
             this.ObjESGC_Estado           = ObjECMP_OrdenServicio.ObjESGC_Estado;
             this.ObjESGC_Moneda           = ObjECMP_OrdenServicio.ObjESGC_Moneda;
             this.ObjESGC_Documento        = ObjECMP_OrdenServicio.ObjESGC_Documento;
             this.Periodo                  = ObjECMP_OrdenServicio.Periodo;
             this.Fecha       = ObjECMP_OrdenServicio.Fecha;
             this.Serie       = ObjECMP_OrdenServicio.Serie;
             this.Numero      = ObjECMP_OrdenServicio.Numero;
             this.FechaInicio = ObjECMP_OrdenServicio.FechaInicio;
             this.FechaFin    = ObjECMP_OrdenServicio.FechaFin;
             this.Contacto    = ObjECMP_OrdenServicio.Contacto;
             this.TipoCambio  = ObjECMP_OrdenServicio.TipoCambio;
             this.Gravada     = ObjECMP_OrdenServicio.Gravada;
             this.IGV         = ObjECMP_OrdenServicio.IGV;
             this.ImporteIGV  = ObjECMP_OrdenServicio.ImporteIGV;
             this.Exonerado   = ObjECMP_OrdenServicio.Exonerado;
             this.Retencion   = ObjECMP_OrdenServicio.Retencion;
         }
     }
 }
Esempio n. 3
0
 public ECMP_Compra(object DataGridSelectedItem, TipoConstructor MyTipoConstructor)
 {
     if (MyTipoConstructor == TipoConstructor.Insert || DataGridSelectedItem == null)
     {
         this.Opcion          = "I";
         this.CodDocumentoRef = "CMP";
         this.Fecha           = DateTime.Now;
         this.FechaContable   = DateTime.Now;
         this.ObjESGC_Estado  = new ESGC_Estado();
         this.TipoCambio      = 1;
         this.ObjESGC_Estado  = new ESGC_Estado()
         {
             CodEstado = "PECMP"
         };
         this.ObjEMNF_TipoDestino = new EMNF_TipoDestino();
         this.CodDocumento        = string.Empty;
         this.Serie         = string.Empty;
         this.Numero        = string.Empty;
         this.AfectaAlmacen = true;
         this.Anticipo      = false;
         this.CajaBanco     = false;
         this.Planilla      = false;
     }
     else
     {
         if (DataGridSelectedItem is ECMP_Compra)
         {
             var ObjECMP_Compra = (ECMP_Compra)DataGridSelectedItem;
             this.Opcion   = (MyTipoConstructor == TipoConstructor.Update) ? "U" : "D";
             this.IdCompra = ObjECMP_Compra.IdCompra;
             this.ObjEMNF_ClienteProveedor    = ObjECMP_Compra.ObjEMNF_ClienteProveedor;
             this.ObjESGC_FormaPago           = ObjECMP_Compra.ObjESGC_FormaPago;
             this.ObjEMNF_OperacionMovimiento = ObjECMP_Compra.ObjEMNF_OperacionMovimiento;
             this.ObjEMNF_MotivoMovimiento    = ObjECMP_Compra.ObjEMNF_MotivoMovimiento;
             this.ObjEMNF_SubDiario           = ObjECMP_Compra.ObjEMNF_SubDiario;
             this.ObjESGC_Estado      = ObjECMP_Compra.ObjESGC_Estado;
             this.ObjESGC_Moneda      = ObjECMP_Compra.ObjESGC_Moneda;
             this.ObjEMNF_MedioPago   = ObjECMP_Compra.ObjEMNF_MedioPago;
             this.ObjEMNF_TipoDestino = ObjECMP_Compra.ObjEMNF_TipoDestino;
             this.CodDocumento        = ObjECMP_Compra.CodDocumento;
             this.Serie            = ObjECMP_Compra.Serie;
             this.Numero           = ObjECMP_Compra.Numero;
             this.Periodo          = ObjECMP_Compra.Periodo;
             this.Fecha            = ObjECMP_Compra.Fecha;
             this.FechaContable    = ObjECMP_Compra.FechaContable;
             this.FechaVencimiento = ObjECMP_Compra.FechaVencimiento;
             this.TipoCambio       = ObjECMP_Compra.TipoCambio;
             this.Gravada          = ObjECMP_Compra.Gravada;
             this.Exonerada        = ObjECMP_Compra.Exonerada;
             this.IGV              = ObjECMP_Compra.IGV;
             this.ImporteIGV       = ObjECMP_Compra.ImporteIGV;
             this.IncluyeIGV       = ObjECMP_Compra.IncluyeIGV;
             this.AfectoDetraccion = ObjECMP_Compra.AfectoDetraccion;
             this.AfectoPercepcion = ObjECMP_Compra.AfectoPercepcion;
             this.Detraccion       = ObjECMP_Compra.Detraccion;
             this.Percepcion       = ObjECMP_Compra.Percepcion;
             this.Glosa            = ObjECMP_Compra.Glosa;
             this.GuiaRemision     = ObjECMP_Compra.GuiaRemision;
             this.AfectaAlmacen    = ObjECMP_Compra.AfectaAlmacen;
             this.CodDocumentoRef  = ObjECMP_Compra.CodDocumentoRef;
             this.SerieRef         = ObjECMP_Compra.SerieRef;
             this.NumeroRef        = ObjECMP_Compra.NumeroRef;
             this.Anticipo         = ObjECMP_Compra.Anticipo;
             this.Retencion        = ObjECMP_Compra.Retencion;
             this.Distribucion     = ObjECMP_Compra.Distribucion;
             this.CajaBanco        = ObjECMP_Compra.CajaBanco;
             this.Planilla         = ObjECMP_Compra.Planilla;
         }
     }
 }