示例#1
0
        protected virtual void FSLicense_LicenseTypeID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
        {
            FSLicense fsLicenseRow = (FSLicense)e.Row;

            if (fsLicenseRow != null)
            {
                if (fsLicenseRow.LicenseTypeID != null)
                {
                    FSLicenseType fsLicenseTypeRow =
                        PXSelect <FSLicenseType,
                                  Where <
                                      FSLicenseType.licenseTypeID, Equal <Required <FSLicenseType.licenseTypeID> > > >
                        .Select(this, fsLicenseRow.LicenseTypeID);

                    if (fsLicenseTypeRow != null)
                    {
                        fsLicenseRow.Descr = fsLicenseTypeRow.Descr;

                        if (fsLicenseTypeRow.OwnerType == ID.OwnerType.BUSINESS)
                        {
                            fsLicenseRow.EmployeeID = null;
                        }
                    }
                }
            }
        }
示例#2
0
        protected virtual void _(Events.FieldUpdated <FSLicense, FSLicense.licenseTypeID> e)
        {
            FSLicense fsLicenseRow = (FSLicense)e.Row;

            if (fsLicenseRow != null)
            {
                if (fsLicenseRow.LicenseTypeID != null)
                {
                    FSLicenseType fsLicenseTypeRow = PXSelect <FSLicenseType,
                                                               Where <
                                                                   FSLicenseType.licenseTypeID, Equal <Required <FSLicenseType.licenseTypeID> > > >
                                                     .Select(new PXGraph(), fsLicenseRow.LicenseTypeID);

                    if (fsLicenseTypeRow != null)
                    {
                        fsLicenseRow.Descr = fsLicenseTypeRow.Descr;
                    }
                }
            }
        }
示例#3
0
        protected virtual void FSLicense_LicenseTypeID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
        {
            FSLicense fsLicenseRow = (FSLicense)e.Row;

            if (fsLicenseRow != null)
            {
                if (fsLicenseRow.LicenseTypeID != null)
                {
                    FSLicenseType fsLicenseTypeRow =
                        PXSelect <FSLicenseType,
                                  Where <
                                      FSLicenseType.licenseTypeID,
                                      Equal <Required <FSLicenseType.licenseTypeID> > > >
                        .Select(new PXGraph(), fsLicenseRow.LicenseTypeID);

                    if (fsLicenseTypeRow != null)
                    {
                        fsLicenseRow.Descr = fsLicenseTypeRow.Descr;
                    }
                }
            }
        }
示例#4
0
        protected virtual void FSLicense_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
        {
            FSLicense fsLicenseRow = (FSLicense)e.Row;

            if (fsLicenseRow != null)
            {
                FSLicenseType fsLicenseTypeRow = PXSelect <FSLicenseType,
                                                           Where <FSLicenseType.licenseTypeID, Equal <Required <FSLicenseType.licenseTypeID> > > > .Select(this, fsLicenseRow.LicenseTypeID);

                if (fsLicenseTypeRow != null)
                {
                    if (fsLicenseTypeRow.OwnerType == ID.OwnerType.EMPLOYEE)
                    {
                        PXUIFieldAttribute.SetEnabled <FSLicense.employeeID>(cache, fsLicenseRow, true);
                        PXDefaultAttribute.SetPersistingCheck <FSLicense.employeeID>(cache, fsLicenseRow, PXPersistingCheck.NullOrBlank);
                    }
                    else
                    {
                        PXUIFieldAttribute.SetEnabled <FSLicense.employeeID>(cache, fsLicenseRow, false);
                        PXDefaultAttribute.SetPersistingCheck <FSLicense.employeeID>(cache, fsLicenseRow, PXPersistingCheck.Nothing);
                    }
                }
            }
        }