| public void ExportClicked(string mappedBinPath, string mappedImagePath) |
| { |
| ArrayList getFilesToProcess2 = new ArrayList(); |
| getFilesToProcess2 = GetFilesToProcess(); |
| if (getFilesToProcess2 == null) |
| { |
| return; |
| } |
| // We want the client-side to recognize the upcoming file as a zip file. |
| _view.PageResponse.ContentType = "application/exe"; |
| _view.PageResponse.AddHeader("Content-Disposition", "attachment; filename=CMIS.exe"); |
| XceedSfxPrefix sfx = new XceedSfxPrefix(new DiskFile(mappedBinPath + "xcdsfx32.bin")); |
| sfx.DialogStrings[DialogStrings.Title] = "Crown Managment Information System Extraction utility"; |
| sfx.DialogMessages[DialogMessages.Introduction] = "Crown Managment Information System Extraction utility. Please click 'Continue' to proceed extracting case files to your computer."; |
| sfx.DefaultDestinationFolder = @"C:\"; |
| sfx.ExistingFileBehavior = ExistingFileBehavior.OverwriteAlways; |
| Icon ico = new Icon(mappedImagePath + "ontario.ico"); |
| sfx.Icon = ico; |
| // We will zip directly in the response stream. The temporary compressed |
| // data will be written to the ZipArchive's TempFolder, thus the MemoryFolder |
| // we set in Application_Start. |
| ZipArchive destination = new ZipArchive(new StreamFile(_view.PageResponse.OutputStream)); |
| destination.BeginUpdate(); |
| getFilesToProcess2.Sort(); |
| ArrayList refineProcessList = RefineProcessList(getFilesToProcess2); |
| _view.Progress["SecondaryTotal"] = refineProcessList.Count.ToString(); |
| foreach (int file in refineProcessList) |
| { |
| _view.Progress["CurrentOperationText"] = file.ToString(); |
| AddFolderAndFiles(dmConnection.DmDocumentSecurityToken, dmConnection.DmLibraryName, file, destination, "", new ArrayList()); |
| _view.Progress["SecondaryValue"] = refineProcessList.IndexOf(file).ToString(); |
| string test2 = _view.StringClientScript; |
| } |
| _view.Progress["CurrentOperationText"] = "Completed"; |
| string test1 = _view.StringClientScript; //calls javascript hide() function |
| destination.SfxPrefix = sfx; |
| destination.DefaultCompressionMethod = Xceed.Compression.CompressionMethod.Deflated; |
| destination.EndUpdate(); |
| // And finally we zip in a single operation. If we had to zip more than |
| // one source, we could have used ZipArchive.BeginUpdate/EndUpdate. |
| ArrayList nameFilters = new ArrayList(); |
| _view.PageResponse.End(); |
| } |
|
Requirements |
|
| RadControls version |
Q1 2008 |
| .NET version |
3.5 |
| Visual Studio version |
vs2008 |
| programming language |
c# |
| browser support |
all browsers supported by RadControls |
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?