Esempio n. 1
0
 public FrmCrearPercepcion(Percepcion percepcion, XPCollection xpcPercepcion, UnitOfWork uow, XPCollection xpcConcepto)
     : this()
 {
     xpcConcepto.Filter = new BinaryOperator("Tipo", ConceptoTipo.Percepcion, BinaryOperatorType.Equal);
     this.Percepcion = percepcion;
     this.uow = uow;
     this.xpcConcepto = xpcConcepto;
     this.xpcConcepto.Session = uow;
     this.xpcPercepcion = xpcPercepcion;
     this.xpcPercepcion.Session = uow;
     lkpConcepto.Properties.DataSource = xpcConcepto;
     lkpConcepto.Properties.ValueMember = "This";
     lkpConcepto.Properties.DisplayMember = "Descripcion";
 }
Esempio n. 2
0
 private void EditPercepcion(Percepcion percepcion)
 {
     FrmCrearPercepcion crearPercepcion = new FrmCrearPercepcion(percepcion, xpcPercepcionAnidada, uowAnidada, xpcConceptoAnidada);
     crearPercepcion.ShowDialog();
     if (crearPercepcion.correcto)
     {
         percepcion.Empleado = uowAnidada.GetNestedObject(empleado);
         percepcion.Save();
         xpcPercepcionAnidada.Add(percepcion);
         RefreshGrid();
     }
     else
     {
         if (!uowAnidada.IsNewObject(percepcion))
         {
             percepcion.Reload();
             RefreshGrid();
         }
     }
 }