business-objects

Escaping SQL Strings in Java

冷暖自知 提交于 2019-12-01 16:57:35
问题 Background: I am currently developing a Java front end for an Enterprise CMS database (Business Objects). At the moment, I am building a feature to allow the user to build a custom database query. I have already implemented measures to ensure the user is only able to select using a subset of the available columns and operators that have been approved for user access (eg. SI_EMAIL_ADDRESS can be selected while more powerful fields like SI_CUID cannot be). So far things have been going on

c# combobox binding to list of objects

故事扮演 提交于 2019-12-01 15:21:42
Quick question, is it possible to bind a combobox to a list of objects, but have the selectedvalue property point to the object, not a property of the object. I only ask because we have some Business Objects which have references to other objects - such as a 'Year' object. That year object may need to be switched out for another year object. Only solution I can come up with is to have another class with a single property, in this case pointing to a year object. then bind the combobox to a List of these and set both the display and value members to the single property. But doing that for any

What is the best way to Update only 1 field of a big Business Object inside a transaction?

爱⌒轻易说出口 提交于 2019-12-01 01:50:26
I am in a situation where I have to perform a transaction master detail record ( Drop prev details, insert new details, Update Master status ) Master Business Object has 20 fields Details Business Object has 4 fields only Now I have to update only 1 field in master table and 4 fields in details table for insert. If I initialize a new master object, 19 fields are being wasted for a simple update. What do I do to efficiently handle this situation ? Can I make a new object and inherit only one field from my master business object ? Please give me a little working example if you advise me a DTO or

show only in the first row in crystal reports details section

橙三吉。 提交于 2019-11-29 18:58:15
问题 i have a crystal report and there is a field in details section which currently showing for each row. what's the way to set this field to show only once on the very first row? 回答1: Right-click on the field in Report Designer, select Format Field... , click on the Common tab in the Format Editor dialog, click on the conditional suppression button (the box marked x-2 to the right of Suppress) and enter the formula RecordNumber > 1 . Click Save and close to exit the Suppress Format formula

Bind command from Business object to View in MVVM

浪尽此生 提交于 2019-11-29 12:28:06
I populate DataGrid in WPF through MVVM. I have business object with 4 properties to create the Row and Columns in the DataGrid. <DataGrid CanUserAddRows="True" ItemsSource="{Binding Path=PersonsInfo}" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserReorderColumns="True" CanUserSortColumns="True"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"/> <DataGridTextColumn Header="Age" Binding="{Binding Path=Age}"/> <DataGridTextColumn Header="Date Of Birth" Binding="{Binding Path=DateOfBirth}"/> <DataGridTextColumn Header="Address" Binding="{Binding

Bind command from Business object to View in MVVM

夙愿已清 提交于 2019-11-28 06:21:40
问题 I populate DataGrid in WPF through MVVM. I have business object with 4 properties to create the Row and Columns in the DataGrid. <DataGrid CanUserAddRows="True" ItemsSource="{Binding Path=PersonsInfo}" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserReorderColumns="True" CanUserSortColumns="True"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"/> <DataGridTextColumn Header="Age" Binding="{Binding Path=Age}"/> <DataGridTextColumn Header="Date Of

converting POCO entity to business entity

让人想犯罪 __ 提交于 2019-11-27 21:45:24
I am willing to integrate the entity framework as my data layer. I followed articles and generated poco entities using this tutorial: http://blogs.msdn.com/b/adonet/archive/2010/01/25/walkthrough-poco-template-for-the-entity-framework.aspx I have my own business objects. Here is my business object Brach: public class Branch { public long BranchId { get; private set; } public string BranchName { get; set; } public string BranchCode { get; set; } public Branch() { } public void InsertBranch(Guid companyId) { using (var ctx = new Entities.Entities()) { var branch = new T_STF_BRANCH() //This is

Force validation on bound controls in WPF

空扰寡人 提交于 2019-11-27 11:05:45
I have a WPF dialog with a couple of textboxes on it. Textboxes are bound to my business object and have WPF validation rules attached. The problem is that user can perfectly click 'OK' button and close the dialog, without actually entering the data into textboxes. Validation rules never fire, since user didn't even attempt entering the information into textboxes. Is it possible to force validation checks and determine if some validation rules are broken? I would be able to do it when user tries to close the dialog and prohibit him from doing it if any validation rules are broken. Thank you.

Business Objects, Validation And Exceptions

回眸只為那壹抹淺笑 提交于 2019-11-27 10:11:45
I’ve been reading a few questions and answers regarding exceptions and their use. Seems to be a strong opinion that exceptions should be raised only for exception, unhandled cases. So that lead me to wondering how validation works with business objects. Lets say I have a business object with getters/setters for the properties on the object. Let’s say I need to validate that the value is between 10 and 20. This is a business rule so it belongs in my business object. So that seems to imply to me that the validation code goes in my setter. Now I have my UI databound to the properties of the data

converting POCO entity to business entity

て烟熏妆下的殇ゞ 提交于 2019-11-27 04:32:51
问题 I am willing to integrate the entity framework as my data layer. I followed articles and generated poco entities using this tutorial: http://blogs.msdn.com/b/adonet/archive/2010/01/25/walkthrough-poco-template-for-the-entity-framework.aspx I have my own business objects. Here is my business object Brach: public class Branch { public long BranchId { get; private set; } public string BranchName { get; set; } public string BranchCode { get; set; } public Branch() { } public void InsertBranch