示例#1
0
        private void UpdateHearCCH()  //  lam, 20130411, MSF-290
        {
            using (UpdateHearCCH uhcch = new UpdateHearCCH())
            {
                //Must run the update on the customer database first
                String HearCCH = "";

                using (Control c = cuwReview.CreateUserStep.ContentTemplateContainer)
                {
                    Control pnl = c.FindControl("pnlHearCCH");

                    for (int i = 0; i < pnl.Controls.Count; i++)
                    {
                        Control cc = pnl.Controls[i];
                        if (cc.GetType().FullName.ToLower() == "system.web.ui.webcontrols.checkbox")
                        {
                            CheckBox chk = (CheckBox)cc;
                            if (chk.Checked)
                            {
                                TextBox txt = (TextBox)pnl.FindControl(chk.ID.Replace("chk", "txt"));
                                HearCCH += (HearCCH == "" ? "" : "|") + (txt != null ? txt.Text.Trim() : chk.Text.Replace("&nbsp;", "").Replace("</br>", "").Trim());
                            }
                        }
                    }
                }

                if (HearCCH != "")
                {
                    uhcch.UpdateClientSide(HearCCH, ThisSession.CCHID);
                    if (!uhcch.HasErrors)
                    {
                    }
                }
            }
        }
示例#2
0
        //  lam, 20130411, MSF-290
        private void UpdateHearCCH()
        {
            using (UpdateHearCCH uhcch = new UpdateHearCCH())
            {
                //Must run the update on the customer database first
                String HearCCH = "";

                using (Control c = cuwReview.CreateUserStep.ContentTemplateContainer)
                {
                    Control pnl = c.FindControl("pnlHearCCH");

                    for (int i = 0; i < pnl.Controls.Count; i++)
                    {
                        Control cc = pnl.Controls[i];
                        if (cc.GetType().FullName.ToLower() == "system.web.ui.webcontrols.checkbox")
                        {
                            CheckBox chk = (CheckBox)cc;
                            if (chk.Checked)
                            {
                                TextBox txt = (TextBox)pnl.FindControl(chk.ID.Replace("chk", "txt"));
                                HearCCH += (HearCCH == "" ? "" : "|") + (txt != null ? txt.Text.Trim() : chk.Text.Replace("&nbsp;", "").Replace("</br>", "").Trim());
                            }
                        }
                    }
                }

                if (HearCCH != "")
                {
                    uhcch.UpdateClientSide(HearCCH, ThisSession.CCHID);
                    if (!uhcch.HasErrors)
                    { }
                }
            }
        }