i18n code (use FM Dates instead of localized dates)

This commit is contained in:
sam 2010-07-13 07:03:41 +00:00
parent c6895cc1b2
commit ebed3cbb0e
1 changed files with 16 additions and 3 deletions

View File

@ -23,6 +23,9 @@ namespace IndianHealthService.ClinicalScheduling
private System.Windows.Forms.Label lblProgress; private System.Windows.Forms.Label lblProgress;
private System.ComponentModel.IContainer components; private System.ComponentModel.IContainer components;
delegate DataTable RPMSDataTableDelegate(string CommandString, string TableName);
#region Fields #region Fields
private DateTime m_dtBegin; private DateTime m_dtBegin;
private DateTime m_dtEnd; private DateTime m_dtEnd;
@ -186,10 +189,20 @@ namespace IndianHealthService.ClinicalScheduling
//this.timerPoll.Stop(); //this.timerPoll.Stop();
lblProgress.Text = "Starting Process... \r\n"; lblProgress.Text = "Starting Process... \r\n";
string sSql = "BSDX COPY APPOINTMENTS^" + m_ResourceID + "^" + m_HospLocationID + "^" + m_dtBegin.ToShortDateString() + "^" + m_dtEnd.ToShortDateString(); string sFMBeginDate = FMDateTime.Create(m_dtBegin).DateOnly.FMDateString;
DataTable dt = m_DocManager.RPMSDataTable(sSql, "ApptCopy"); string sFMEndDate = FMDateTime.Create(m_dtEnd).DateOnly.FMDateString;
Debug.Assert(dt.Rows.Count == 1);
//smh - i18n
//string sSql = "BSDX COPY APPOINTMENTS^" + m_ResourceID + "^" + m_HospLocationID + "^" + m_dtBegin.ToShortDateString() + "^" + m_dtEnd.ToShortDateString();
string sSql = "BSDX COPY APPOINTMENTS^" + m_ResourceID + "^" + m_HospLocationID + "^" + sFMBeginDate + "^" + sFMEndDate;
//DataTable dt = m_DocManager.RPMSDataTable(sSql, "ApptCopy");
//Debug.Assert(dt.Rows.Count == 1);
// TODO (later): delegate is supposed to support cross thread communication -- but this doesn't work.
RPMSDataTableDelegate d = new RPMSDataTableDelegate(m_DocManager.RPMSDataTable);
DataTable dt = d.Invoke(sSql, "ApptCopy");
Debug.Assert(dt.Rows.Count == 1);
DataRow dr = dt.Rows[0]; DataRow dr = dt.Rows[0];
m_sTask = "0"; m_sTask = "0";