コード例 #1
0
ファイル: SpinePriorMedTx.ascx.cs プロジェクト: aomiit/caisis
        /// <summary>
        /// Add script to update MedTxType
        /// </summary>
        protected void AutoPopulateTypeByAgent(EformComboBox medTxAgent, EformSelect medTxType)
        {
            if (medTxAgent != null && medTxType != null)
            {
                string strJS = "cascadeParentByChildCode(" + medTxAgent.ClientID + "," + medTxType.ClientID + ",'MedTxAgent', 'MedTxType');";

                medTxAgent.Attributes.Add("onblur", strJS);
            }
        }
コード例 #2
0
 protected void ShowDescByCPT()
 {
     for (int i = 1; i <= 5; i++)
     {
         EformComboBox procCPTCode = this.FindControl("ProcCPT_Code_" + i) as EformComboBox;
         EformSelect   procCPTDesc = this.FindControl("ProcCPT_Description_" + i) as EformSelect;
         AutoPopulateDescByCPT(procCPTCode, procCPTDesc);
     }
 }
コード例 #3
0
ファイル: SpinePriorMedTx.ascx.cs プロジェクト: aomiit/caisis
 protected void ShowTypeByAgent()
 {
     for (int i = 1; i <= 10; i++)
     {
         EformComboBox medTxAgent = this.FindControl("MedTxAgent_" + i) as EformComboBox;
         EformSelect   medTxType  = this.FindControl("MedTxType_" + i) as EformSelect;
         AutoPopulateTypeByAgent(medTxAgent, medTxType);
     }
 }
コード例 #4
0
        /// <summary>
        /// Add script to update CPT Description
        /// </summary>
        protected void AutoPopulateDescByCPT(EformComboBox procCPTCode, EformSelect procCPTDesc)
        {
            if (procCPTCode != null && procCPTDesc != null)
            {
                string strJS = "cascadeParentByChildCode(" + procCPTCode.ClientID + "," + procCPTDesc.ClientID + ",'SpineProcCPTs', 'SpineProcCPTDesc');";

                procCPTCode.Attributes.Add("onblur", strJS);
            }
        }
コード例 #5
0
        protected void SetProcedureCheckbox(EformCheckBox ProcedureCheckBox, EformComboBox ProcedureSurgeon, EformSelect ProcedureSurgeonType, EformComboBox ProcedureAssistant, EformSelect ProcedureAssistantType)
        {
            string CheckboxOnclickString = "copyProcedureInputValues(this, '" + OpSurgeon.ClientID + "', '" + ProcedureSurgeon.ClientID + "'); ";

            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpSurgeonType.ClientID + "', '" + ProcedureSurgeonType.ClientID + "'); ";
            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpAssistant.ClientID + "', '" + ProcedureAssistant.ClientID + "'); ";
            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpAssistantType.ClientID + "', '" + ProcedureAssistantType.ClientID + "'); ";

            ProcedureCheckBox.Attributes.Add("onclick", CheckboxOnclickString);
        }
コード例 #6
0
        protected void SetProcedureCombobox(EformComboBox ProcedureComboBox, EformComboBox ProcedureSurgeon, EformSelect ProcedureSurgeonType, EformComboBox ProcedureAssistant, EformSelect ProcedureAssistantType)
        {
            string CheckboxOnclickString = "copyProcedureInputValues(this, '" + OpSurgeon.ClientID + "', '" + ProcedureSurgeon.ClientID + "'); ";

            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpSurgeonType.ClientID + "', '" + ProcedureSurgeonType.ClientID + "'); ";
            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpAssistant.ClientID + "', '" + ProcedureAssistant.ClientID + "'); ";
            CheckboxOnclickString += "copyProcedureInputValues(this, '" + OpAssistantType.ClientID + "', '" + ProcedureAssistantType.ClientID + "'); ";

            ProcedureComboBox.OnClientEvent("onfocus", "if(this.value != this.defaultValue) { " + CheckboxOnclickString + " }");
            //ProcedureComboBox.Attributes.Add("onchange", CheckboxOnclickString);
        }
コード例 #7
0
        private void SetHiddenFields(EformComboBox stageSystem, EformComboBox stageT, EformComboBox stageN, EformComboBox stageM, EformHidden disease)
        {
            stageSystem.Attributes.Add("OnBlur", "setPathStageHiddenFields(" + stageT.ClientID + "," + stageN.ClientID + ", " + stageM.ClientID +
                                       "," + disease.ClientID + ", " + stageSystem.ClientID + ");");

            stageT.Attributes.Add("OnBlur", "setPathStageHiddenFields(" + stageT.ClientID + "," + stageN.ClientID + ", " + stageM.ClientID +
                                  "," + disease.ClientID + ", " + stageSystem.ClientID + ");");

            stageN.Attributes.Add("OnBlur", "setPathStageHiddenFields(" + stageT.ClientID + "," + stageN.ClientID + ", " + stageM.ClientID +
                                  "," + disease.ClientID + ", " + stageSystem.ClientID + ");");
            stageM.Attributes.Add("OnBlur", "setPathStageHiddenFields(" + stageT.ClientID + "," + stageN.ClientID + ", " + stageM.ClientID +
                                  "," + disease.ClientID + ", " + stageSystem.ClientID + ");");
        }
コード例 #8
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
            }
        }
コード例 #9
0
 protected void setMedTxDetails(EformComboBox agentCombo, EformTextBox typeTxtBx, EformTextBox medDiseaseTxt, EformTextBox medQltyTxt)
 {
     agentCombo.Attributes.Add("onblur", "updateMedTxDetails('" + typeTxtBx.ClientID + "','" + medDiseaseTxt.ClientID + "','" + medQltyTxt.ClientID + "');");
 }
コード例 #10
0
 protected void GetComorComboQuality(EformComboBox ComorCombo, EformTextBox ComorQltyTxt)
 {
     ComorCombo.Attributes.Add("onblur", "updateComorComboQlty('" + ComorQltyTxt.ClientID + "');");
 }
コード例 #11
0
 protected void getStatus(EformTextBox dateTxt, EformComboBox locationTxt, EformTextBox statusTxt, EformTextBox statusDiseaseTxt, EformTextBox statusQltyTxt)
 {
     dateTxt.Attributes.Add("onblur", "updateStatusOnDate('" + dateTxt.ClientID + "','" + locationTxt.ClientID + "','" + statusTxt.ClientID + "','" + statusDiseaseTxt.ClientID + "','" + statusQltyTxt.ClientID + "');");
     statusTxt.Attributes.Add("onblur", "updateStatusOnDate('" + dateTxt.ClientID + "','" + locationTxt.ClientID + "','" + statusTxt.ClientID + "','" + statusDiseaseTxt.ClientID + "','" + statusQltyTxt.ClientID + "');");
     locationTxt.Attributes.Add("onblur", "updateStatusOnDate('" + dateTxt.ClientID + "','" + locationTxt.ClientID + "','" + statusTxt.ClientID + "','" + statusDiseaseTxt.ClientID + "','" + statusQltyTxt.ClientID + "');");
 }
コード例 #12
0
 protected void GetRadtxQlty(EformComboBox RadTypeCombo, EformTextBox RadQltyTxt)
 {
     RadTypeCombo.Attributes.Add("onblur", "updateRadTxQlty('" + RadQltyTxt.ClientID + "');");
 }
コード例 #13
0
ファイル: Recurrence.ascx.cs プロジェクト: aomiit/caisis
 protected void GetStatusDetails(EformComboBox statusCombo, EformTextBox statusdiseaseTxt, EformTextBox statusQltyTxt)
 {
     statusCombo.Attributes.Add("onblur", "updateRecurDetails('" + statusdiseaseTxt.ClientID + "','" + statusQltyTxt.ClientID + "');");
 }
コード例 #14
0
 protected void GetRadtxTarget(EformDropDownList RadType, EformTextBox RadTargetTxt, EformComboBox RadQltyTxt)
 {
     RadType.Attributes.Add("onblur", "updateRadTxTarget('" + RadTargetTxt.ClientID + "','" + RadQltyTxt.ClientID + "');");
 }
コード例 #15
0
ファイル: BaseEFormControl.cs プロジェクト: aomiit/caisis
        /// <summary>
        ///
        /// </summary>
        /// <param name="con"></param>
        /// <param name="xmlDoc"></param>
        /// <param name="inputFieldValue"></param>
        protected void SetControlValue(IEformInputField con, XmlDocument xmlDoc, string inputFieldValue)
        {
            if (inputFieldValue != null)
            {
                // TODO: collapse this into a call on the IEformInputField interface
                if (con is EformTextBox)
                {
                    EformTextBox temp = (EformTextBox)con;
                    //temp.Value = inputFieldValue;
                    temp.Text = inputFieldValue;
                }

                else if (con is EformHidden)
                {
                    EformHidden temp = (EformHidden)con;
                    // let's experiment
                    string val = inputFieldValue;
                    if (temp.Field.EndsWith("Date")) // we want Dates enabled to pick up the DateText conversion
                    {
                        temp.Disabled = false;
                        // we need to propagate the value here, b/c it would be empty on the page
                        temp.Value = val;
                    }
                    else if (val == null || "".Equals(val))
                    {
                        temp.Disabled = true;
                    }
                    else
                    {
                        temp.Disabled = false;
                        // persist the value in this case
                        temp.Value = val;
                    }

                    // leave the value alone, keeping what was on the page;
                    // temp.Value = inputFieldValue;
                }

                else if (con is EformTextArea)
                {
                    EformTextArea temp = (EformTextArea)con;
                    //temp.Value = inputFieldValue;
                    temp.Text = inputFieldValue;
                }

                else if (con is EformDropDownList)
                {
                    EformDropDownList temp = (EformDropDownList)con;
                    //temp.Value = inputFieldValue;
                    temp.SelectedValue = inputFieldValue;
                }

                else if (con is EformComboBox)
                {
                    EformComboBox temp = (EformComboBox)con;
                    temp.Value = inputFieldValue;
                }

                //else if (con is EformRadioButtonList)
                //{
                //    EformRadioButtonList temp = (EformRadioButtonList)con;
                //    string val = inputFieldValue;

                //    if (val != null && !val.Equals(""))
                //        temp.SelectedValue = val;
                //}
                else if (con is EformRadioButtonGroup)
                {
                    EformRadioButtonGroup rg = (EformRadioButtonGroup)con;

                    // tell it to the child controls
                    foreach (Control c in rg.Controls)
                    {
                        if (c is EformRadioButton)
                        {
                            EformRadioButton rb = (EformRadioButton)c;

                            string nodeInnerText = GetNodeValue(rg, xmlDoc);

                            if (nodeInnerText != null && !"".Equals(nodeInnerText))
                            {
                                if (rb.Value.Equals(nodeInnerText))
                                {
                                    rb.Checked = true;
                                }
                            }
                        }
                    }
                }
                else if (con is EformRadioButton)
                {
                    EformRadioButton rb = (EformRadioButton)con;

                    string nodeInnerText = inputFieldValue;

                    if (nodeInnerText != null && nodeInnerText != "")
                    {
                        rb.Checked = true;
                    }
                }
                else if (con is EformCheckBox)
                {
                    EformCheckBox cb = (EformCheckBox)con;

                    string nodeInnerText = inputFieldValue;

                    if (nodeInnerText != null && nodeInnerText != "")
                    {
                        cb.Checked = true;
                    }
                }
                else if (con is EformSelect)
                {
                    EformSelect temp = (EformSelect)con;
                    temp.Text = inputFieldValue;
                }
                else if (con is EformCheckBoxList || con is EformRadioButtonList)
                {
                    IEformInputField eFormControl = con as IEformInputField;
                    eFormControl.Value = inputFieldValue;
                }
            }
        }