Exemple #1
0
        protected void BuildOtherStatusRow(string Status, Label StatusDateLabel, EformHidden StatusDate, EformTextBox StatusDateText, HtmlTableRow StatusRow, EformCheckBox CurrentStatusCheckBox, EformComboBox StatusValue)
        {
            StatusDa sDa = new StatusDa();
            DataSet  sDs = sDa.FormGetLastStatusByStatus(this._patientId, this._eformName, "Dynamic", Status);

            // set the number of blank rows that are added to the medications section

            if (sDs.Tables.Count > 0 && sDs.Tables[0].Rows.Count > 0)
            {
                if (sDs.Tables[0].Rows[0]["StatusDateText"].ToString().Length > 0)
                {
                    StatusDateLabel.Text          = sDs.Tables[0].Rows[0]["StatusDateText"].ToString();
                    StatusDateText.Visible        = false;
                    CurrentStatusCheckBox.Visible = false;
                    ActivatePopulatedStatusRow(StatusRow, sDs.Tables[0].Rows[0]["StatusId"].ToString());
                }
                else if (sDs.Tables[0].Rows[0]["StatusDate"].ToString().Length > 0)
                {
                    StatusDateLabel.Text          = sDs.Tables[0].Rows[0]["StatusDate"].ToString();
                    StatusDateText.Visible        = false;
                    CurrentStatusCheckBox.Visible = false;
                    ActivatePopulatedStatusRow(StatusRow, sDs.Tables[0].Rows[0]["StatusId"].ToString());
                }
                else
                {
                    CurrentStatusCheckBox.Attributes.Add("onclick", "SetDiseaseStateDate(this, '" + StatusDateText.ClientID + "', '" + System.DateTime.Now.ToShortDateString() + "', '" + StatusDate.ClientID + "');");
                    StatusDateLabel.Visible = false;   // prob not necessary -jf
                }
            }
            else
            {
                CurrentStatusCheckBox.Attributes.Add("onclick", "SetDiseaseStateDate(this, '" + StatusDateText.ClientID + "', '" + System.DateTime.Now.ToShortDateString() + "', '" + StatusDate.ClientID + "');");
                StatusDateLabel.Visible = false;   // prob not necessary -jf
            }
        }
Exemple #2
0
        protected void PreSetDiagnosisDate(string Status)
        {
            StatusDa sDa = new StatusDa();
            DataSet  sDs = sDa.FormGetLastStatusByStatus(this._patientId, this._eformName, "Dynamic", Status);


            if (sDs.Tables.Count > 0 && sDs.Tables[0].Rows.Count > 0)
            {
                if (sDs.Tables[0].Rows[0]["StatusDateText"].ToString().Length > 0)
                {
                    PresetDiagnosisDateText = sDs.Tables[0].Rows[0]["StatusDateText"].ToString();
                }
                if (sDs.Tables[0].Rows[0]["StatusDate"].ToString().Length > 0)
                {
                    PresetDiagnosisDate = sDs.Tables[0].Rows[0]["StatusDate"].ToString();
                }
            }
            else
            {
                PresetDiagnosisDateText = Diagnosis_StatusDateText.Value;
                PresetDiagnosisDate     = Diagnosis_StatusDate.Value;
            }
        }