protected virtual void _(Events.RowSelected <FSGeoZoneEmp> e) { if (e.Row == null) { return; } FSGeoZoneEmp fsGeoZoneEmpRow = (FSGeoZoneEmp)e.Row; PXUIFieldAttribute.SetEnabled <FSGeoZoneEmp.geoZoneID> (e.Cache, fsGeoZoneEmpRow, string.IsNullOrEmpty(fsGeoZoneEmpRow.GeoZoneID.ToString())); }
protected virtual void FSGeoZoneEmp_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { if (e.Row == null) { return; } FSGeoZoneEmp fsGeoZoneEmpRow = (FSGeoZoneEmp)e.Row; PXUIFieldAttribute.SetEnabled <FSGeoZoneEmp.geoZoneID> (cache, fsGeoZoneEmpRow, string.IsNullOrEmpty(fsGeoZoneEmpRow.GeoZoneID.ToString())); }
protected virtual void FSGeoZoneEmp_RowInserting(PXCache cache, PXRowInsertingEventArgs e) { if (e.Row == null) { return; } FSGeoZoneEmp fsGeoZoneEmpRow = (FSGeoZoneEmp)e.Row; FSGeoZoneEmp field = PXSelect <FSGeoZoneEmp, Where < FSGeoZoneEmp.geoZoneID, Equal <Required <FSGeoZoneEmp.geoZoneID> >, And < FSGeoZoneEmp.employeeID, Equal <Current <EPEmployee.bAccountID> > > > > .SelectWindowed(Base, 0, 1, fsGeoZoneEmpRow.GeoZoneID); if (field != null) { cache.RaiseExceptionHandling <FSGeoZoneEmp.geoZoneID> (e.Row, fsGeoZoneEmpRow.GeoZoneID, new PXException(TX.Error.ID_ALREADY_USED)); e.Cancel = true; } }
public virtual void EnableDisableGeoZoneEmployee(PXCache cache, FSGeoZoneEmp fsGeoZoneEmpRow) { PXUIFieldAttribute.SetEnabled <FSGeoZoneEmp.employeeID> (cache, fsGeoZoneEmpRow, fsGeoZoneEmpRow.EmployeeID == null); }