protected virtual void SelectEmployeeLineAction() { EmployeeList list = EmployeeList.GetList(moleQule.Base.EEstado.Active, false); EmployeeSelectForm form = new EmployeeSelectForm(this, list); if (form.ShowDialog(this) == DialogResult.OK) { EmployeeInfo item = form.Selected as EmployeeInfo; if (_entity.Lines.GetItem(item) == null) { _entity.Lines.NewItem(_entity, item); } } }
protected override void SetEmployeeAction() { if (!ControlsMng.IsCurrentItemValid(Payrolls_DGW)) { return; } Payroll item = ControlsMng.GetCurrentItem(Payrolls_DGW) as Payroll; if (item.EEstado == moleQule.Base.EEstado.Anulado) { return; } EmployeeSelectForm form = new EmployeeSelectForm(this, _employees); if (form.ShowDialog(this) == DialogResult.OK) { EmployeeInfo empleado = form.Selected as EmployeeInfo; item.CopyFrom(_entity, empleado); } }