public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetParametersDelegate(ProcessParameters); OurUsers.SetParametersDelegate(delegate(List <Users> users) { Console.WriteLine("Users parameters processing"); var processingGraph = PXGraph.CreateInstance <UsersProcess>(); var result = processingGraph.AllUsers.Select().Count > 0; return(result); }); OurUsers.SetParametersDelegate(users => { Console.WriteLine("Users parameters processing"); var processingGraph = PXGraph.CreateInstance <UsersProcess>(); var result = processingGraph.AllUsers.Select().Count > 0; return(result); }); OurUsers.SetParametersDelegate(users => PXGraph.CreateInstance <UsersProcess>().AllUsers.Select().Count > 0); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetParametersDelegate(ProcessParameters); OurUsers.SetParametersDelegate(delegate(List <Users> users) { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); return(processingGraph.BlobSettings.Select().Count > 0); }); OurUsers.SetParametersDelegate(users => { var processingGraph = PXGraph.CreateInstance <UsersProcess>(); processingGraph.Cancel.Press(); return(true); }); OurUsers.SetParametersDelegate(users => PXGraph.CreateInstance <UsersProcess>().OurUsers.Select().Count > 0); }
public UsersProcess() { OurUsers.SetProcessAllCaption("Process users"); OurUsers.SetProcessCaption("Process user"); OurUsers.SetParametersDelegate(ProcessParameters); OurUsers.SetParametersDelegate(delegate(List <Users> users) { Console.WriteLine("Users parameters processing"); var processingGraph = PXGraph.CreateInstance <UsersProcess>(); var result = processingGraph.AllUsers.Select().Count > 0; if (!result) { throw new PXSetupNotEnteredException <Users>(null); } return(result); }); OurUsers.SetParametersDelegate(users => { Console.WriteLine("Users parameters processing"); var processingGraph = PXGraph.CreateInstance <UsersProcess>(); var result = processingGraph.AllUsers.Select().Count > 0; if (!result) { throw new PXSetupNotEnteredException <Users>(null); } return(result); }); // With the current version of Roslyn packages 1.x we cannot analyze this construction //OurUsers.SetParametersDelegate(users => throw new PXSetupNotEnteredException<Users>(null)); }