This question is locked. New answers and comments are not allowed.
Dear all,
I want to know if it is possible to have the following scenarios ...
First:
- Create a user-defined type and use it as projection to return result from DomainService and Bind it to SL DataGrid as follows:
The projection method on DomainService:
The client SL application is using QDSCV to receive the return from Getdailysummery_View and bind it to DataGrid
Second:
- if the previous scenario is applicable, can this be extended to allow user interaction a little bit as follows:
- Define a custom type (joins 4 tables) to display a collection of columns to the end-user
- A user can add/delete rows from/into the grid and submit those changes back to the OA ORM.
Fast reply is much needed !!.
Regards
I want to know if it is possible to have the following scenarios ...
First:
- Create a user-defined type and use it as projection to return result from DomainService and Bind it to SL DataGrid as follows:
public
partial
class
summaryview
{
[Key]
public
int
period {
get
;
set
; }
[Key]
public
short
month_number {
get
;
set
; }
[Key]
public
long
daily_number {
get
;
set
; }
[Key]
public
int
subsidiary_id {
get
;
set
; }
public
string
comp_dailynumber
{
get
{
return
string
.Format(
"{0} / {1}"
,
this
.month_number,
this
.daily_number); }
}
public
int
discriptor {
get
;
set
; }
public
long
? manual_number {
get
;
set
; }
public
DateTime daily_date {
get
;
set
; }
public
string
notes_1 {
get
;
set
; }
public
decimal
? total_credit {
get
;
set
; }
public
decimal
? total_debit {
get
;
set
; }
public
IQueryable<dailysummeryview> Getdailysummery_View(
int
posted)
{
#region Custom Class
var dailys = (from Summary
in
DataContext.dailysummeries
join Period
in
DataContext.Periods on Summary.period_id equals Period.period_id
where
Summary.post_status == posted
&& Summary.daily_date >= Period.date_from
&& Summary.daily_date <= Period.date_to
&& Period.closed != 1
select
new
dailysummaryview
{
period = Summary.period_id,
month_number = Summary.month_number,
daily_number = Summary.daily_number,
subsidiary_id = Summary.subsidiary_id,
discriptor = Summary.discriptor,
manual_number = Summary.manual_number,
daily_date = Summary.daily_date,
notes_1 = Summary.notes_1,
total_credit = details.Sum(k => k.credit),
total_debit = details.Sum(k => k.debit),
});
return
dailys;
#endregion
}
Second:
- if the previous scenario is applicable, can this be extended to allow user interaction a little bit as follows:
- Define a custom type (joins 4 tables) to display a collection of columns to the end-user
- A user can add/delete rows from/into the grid and submit those changes back to the OA ORM.
Fast reply is much needed !!.
Regards