Requirements |
|
RadControls version |
Q1 2008 |
.NET version |
3.5 |
Visual Studio version |
vs2008 |
programming language |
c# |
browser support |
all browsers supported by RadControls |
The code that I started develop the
public
void RefreshReport()
{
tb_reportName.Value =
"Queue of " + this.ReportParameters["QueueTypeParam"].Value.ToString();
LinqDSDataContext db = new LinqDSDataContext();
db.Connection.Open();
if (db != null && db.Connection.State == ConnectionState.Open)
{
#region
Define db query by queue type
IQueryable<hc_Scoring> Recordings = null;
switch (this.ReportParameters["QueueTypeParam"].Value.ToString())
{
case "Scorer":
Recordings = (
from r in db.hc_Scorings.Where(r => r.Status < 250 && r.Status >= 10 && r.Status != 30 && r.Status != 31 && r.Status != 32)
orderby r.TransferDate
orderby r.Priority descending
select r);
break;
case "Supervisor":
Recordings = (
from r in db.hc_Scorings.Where(r => r.Status == 30)
orderby r.TransferDate
orderby r.Priority descending
select r);
break;
case "Tech support":
Recordings = (
from r in db.hc_Scorings.Where(r => r.Status == 32)
orderby r.TransferDate
orderby r.Priority descending
select r);
break;
case "Doctor":
Recordings = (
from r in db.hc_Scorings.Where(r => r.Status == 31)
orderby r.TransferDate
orderby r.Priority descending
select r);
break;
}
#endregion
#region
sortting
bool sortDescending = (bool)this.ReportParameters["DirSort"].Value;
switch (this.ReportParameters["FieldSort"].Value.ToString())
{
case "1":
if (sortDescending)
{
Recordings = Recordings.OrderByDescending(u => u.ScoringId)
.ThenBy(u => u.TransferDate).ThenBy(u => u.Priority);
}
else
{
Recordings = Recordings.OrderBy(u => u.ScoringId)
.ThenBy(u => u.TransferDate).ThenBy(u => u.Priority);
}
break;
case "2":
if (sortDescending)
{
Recordings = Recordings.OrderByDescending(u => u.TransferDate)
.ThenBy(u => u.Priority);
}
else
{
Recordings = Recordings.OrderBy(u => u.TransferDate)
.ThenBy(u => u.Priority);
}
break;
case "3":
if (sortDescending)
{
Recordings = Recordings.OrderByDescending(u => u.Priority)
.ThenBy(u => u.TransferDate);
}
else
{
Recordings = Recordings.OrderBy(u => u.Priority)
.ThenBy(u => u.TransferDate);
}
break;
case "5":
if (sortDescending)
{
Recordings = Recordings.OrderByDescending(u => u.Status)
.ThenBy(u => u.Priority).ThenBy(u => u.TransferDate);
}
else
{
Recordings = Recordings.OrderBy(u => u.Status)
.ThenBy(u => u.Priority).ThenBy(u => u.TransferDate);
}
break;
}
#endregion
this.DataSource = Recordings;
tb_hcid.Value = ??????????????????
}
}
How I need continue?Thanks ahead
Sergey R.