示例#1
0
 public FrmCrearDepartamento(Departamento departamento, XPCollection xpcDepartamento, UnitOfWork uow,XPCollection xpcCuentaContable)
     : this()
 {
     xpcCuentaContable.Filter = new BinaryOperator("TipoCuenta", tipocuenta.Departamento, BinaryOperatorType.Equal);
     this.Departamento = departamento;
     this.uow = uow;
     this.xpcCuentaContable = xpcCuentaContable;
     this.xpcCuentaContable.Session = uow;
     this.xpcDepartamento = xpcDepartamento;
     this.xpcDepartamento.Session = uow;
     lkpCuentaContable.Properties.DataSource = xpcCuentaContable;
     lkpCuentaContable.Properties.ValueMember = "This";
     lkpCuentaContable.Properties.DisplayMember = "Descripcion";
 }
示例#2
0
 private void EditDepartamento(Departamento departamento)
 {
     FrmCrearDepartamento crearDepartamento = new FrmCrearDepartamento(departamento,xpcDepartamento,uow,xpcCuentaContable);
     crearDepartamento.ShowDialog();
     if (crearDepartamento.correcto)
     {
         departamento.Save();
         AuditTrailService.Instance.SaveAuditData(uow);
         uow.CommitChanges();
         RefreshGrid();
     }
     else
     {
         departamento.Reload();
         RefreshGrid();
         RecargarColecciones();
     }
 }