private void lblOk_Click(object sender, EventArgs e)
        {
            ucTime1.timer1.Stop();

            #region 获取身份证信息
            IDCardInfo      idinfo = null;
            FrmIdentityCard frm    = new FrmIdentityCard();
            try
            {
                if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    //获取身份份信息
                    idinfo = frm.IdInfo;
                }
                else
                {
                    //ucTime1.Sec = 60;
                    //ucTime1.timer1.Start();

                    //idinfo = new IDCardInfo();
                    //idinfo.Name = "西安天网";
                    //idinfo.Sex = "男";
                    //idinfo.People = "汉族";
                    //idinfo.Number = "610100199401010229";
                    //idinfo.Birthday = "1994-01-01";
                    //idinfo.Address = "西安市雁塔区丈八六路51号";

                    //return;
                }
            }
            catch (Exception ex)
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("读取居民身份证信息失败:" + ex.Message);
                return;
            }
            finally
            {
                frm.Dispose();
            }
            #endregion

            #region 验证身份证号码
            if (SendCardType == "成人")
            {
                //通过身份证查询是否已经个办理过就诊卡,如果已经办理过则不充许再次办理
                string ConditionStr = string.Empty;

                if (SystemInfo.SystemConfigs["院内就诊卡模式"].DefaultValue.ToString() == "0")
                {
                    ConditionStr = " AND A.IDENTITYNAME='身份证' AND A.IDENTITYCARD='" + idinfo.Number.Trim().ToUpper() + "' AND B.CIRCUIT_STATE IN (0,1) ";
                }
                else
                {
                    ConditionStr = " AND A.IDENTITYNAME='身份证' AND A.IDENTITYCARD='" + idinfo.Number.Trim().ToUpper() + "' AND B.CIRCUIT_STATE IN (0,1) AND B.TYPEID=" + SkyComm.dsCardType.Tables[0].Rows[0]["TYPE_NO"];
                }
                PatientInfoFacade pfacade = new PatientInfoFacade();
                DataSet           pdata   = pfacade.FindCardPatientinfoByCondition(ConditionStr);

                if (pdata.Tables[0].Rows.Count > 0)
                {
                    string strMessage = "患者[" + pdata.Tables[0].Rows[0]["PATIENTNAME"].ToString() + "]已于" + Convert.ToDateTime(pdata.Tables[0].Rows[0]["PROVIDECARDDATE"].ToString()).ToShortDateString() + "办卡,为保证就诊档案完整,不可重复办卡;请核实患者身份,挂失原卡后,补发卡!";
                    if (pdata.Tables[0].Rows[0]["CIRCUIT_STATE"].ToString() == "1")
                    {
                        strMessage = "患者[" + pdata.Tables[0].Rows[0]["PATIENTNAME"].ToString() + "]已于" + Convert.ToDateTime(pdata.Tables[0].Rows[0]["PROVIDECARDDATE"].ToString()).ToShortDateString() + "办过卡,此卡已挂失,请补发卡!";
                    }
                    SkyComm.ShowMessageInfo(strMessage);
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return;
                }
            }
            #endregion

            #region 输入手机号码
            if (SendCardType == "成人")
            {
                string TelePhone           = string.Empty;
                FrmSendCardInputTel frmTel = new FrmSendCardInputTel(idinfo);
                frmTel.IdInfo = idinfo;
                if (frmTel.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    TelePhone = frmTel.TelePhone;
                }
                else
                {
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return;
                }
            }
            else
            {
                string           TelePhone = string.Empty;
                FrmInputForChild frmChild  = new FrmInputForChild(idinfo);
                frmChild.IdInfo = idinfo;
                if (frmChild.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    TelePhone = frmChild.TelePhone;
                }
                else
                {
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return;
                }
            }
            ucTime1.Sec = 60;
            ucTime1.timer1.Start();

            #endregion
        }
        private void lblOk_Click(object sender, EventArgs e)
        {
            ucTime1.timer1.Stop();

            #region 获取身份证信息
            IDCardInfo      idinfo = null;
            FrmIdentityCard frm    = new FrmIdentityCard();
            try
            {
                if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    //获取身份份信息
                    idinfo = frm.IdInfo;
                }
                else
                {
                    //ucTime1.Sec = 60;
                    //ucTime1.timer1.Start();

                    //idinfo = new IDCardInfo();
                    //idinfo.Name = "西安天网";
                    //idinfo.Sex = "男";
                    //idinfo.People = "汉族";
                    //idinfo.Number = "610100199401010229";
                    //idinfo.Birthday = "1994-01-01";
                    //idinfo.Address = "西安市雁塔区丈八六路51号";

                    //return;
                }
            }
            catch (Exception ex)
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("读取居民身份证信息失败:" + ex.Message);
                return;
            }
            finally
            {
                frm.Dispose();
            }
            #endregion

            #region 验证身份证下是否存在卡信息
            string            sqlSelect = " AND ((A.IDENTITYNAME='身份证' AND A.IDENTITYCARD='" + idinfo.Number.Trim() + "' AND A.PATIENTNAME='" + idinfo.Name.Trim() + "') OR (A.GUARDIANIDNUMBER='" + idinfo.Number.Trim() + "')) AND B.CIRCUIT_STATE IN (0,1) ";
            PatientInfoFacade pfacade   = new PatientInfoFacade();
            DataSet           pdata     = pfacade.FindCardPatientinfoByCondition(sqlSelect);
            if (pdata == null || pdata.Tables.Count == 0 || pdata.Tables[0].Rows.Count == 0)
            {
                SkyComm.ShowMessageInfo("无该身份证对应的就诊卡信息,请使用自助办卡功能办理就诊卡!");
                idinfo      = null;
                ucTime1.Sec = 60;
                ucTime1.timer1.Start();
                return;
            }

            #endregion

            #region 输入手机号码
            string TelePhone           = string.Empty;
            FrmSendCardInputTel frmTel = new FrmSendCardInputTel(idinfo);
            frmTel.IdInfo = idinfo;
            if (frmTel.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                TelePhone = frmTel.TelePhone;
            }
            else
            {
                idinfo      = null;
                ucTime1.Sec = 60;
                ucTime1.timer1.Start();
                return;
            }

            ucTime1.Sec = 60;
            ucTime1.timer1.Start();

            #endregion
        }
        private bool ShowForm()
        {
            #region 验证身份证号码
            if (SendCardType == "成人")
            {
                Log.Info("查询身份证信息", "查询身份证信息", "查询身份证信息");
                //通过身份证查询是否已经个办理过就诊卡,如果已经办理过则不充许再次办理
                string            ConditionStr = " AND A.IDENTITYNAME='身份证' AND A.IDENTITYCARD='" + idinfo.Number.Trim() + "' AND B.CIRCUIT_STATE IN (0,1) ";
                PatientInfoFacade pfacade      = new PatientInfoFacade();
                DataSet           pdata        = pfacade.FindCardPatientinfoByCondition(ConditionStr);

                if (pdata.Tables[0].Rows.Count > 0)
                {
                    string strMessage = "患者[" + pdata.Tables[0].Rows[0]["PATIENTNAME"].ToString() + "]已于" + Convert.ToDateTime(pdata.Tables[0].Rows[0]["PROVIDECARDDATE"].ToString()).ToShortDateString() + "办卡,为保证就诊档案完整,不可重复办卡;请核实患者身份,挂失原卡后,补发卡!";
                    if (pdata.Tables[0].Rows[0]["CIRCUIT_STATE"].ToString() == "1")
                    {
                        strMessage = "患者[" + pdata.Tables[0].Rows[0]["PATIENTNAME"].ToString() + "]已于" + Convert.ToDateTime(pdata.Tables[0].Rows[0]["PROVIDECARDDATE"].ToString()).ToShortDateString() + "办过卡,此卡已挂失,请补发卡!";
                    }
                    SkyComm.ShowMessageInfo(strMessage);
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return(false);
                }
            }
            #endregion

            #region 输入手机号码
            if (SendCardType == "成人")
            {
                Log.Info("输入手机号码", "输入手机号码", "输入手机号码");
                string TelePhone           = string.Empty;
                FrmSendCardInputTel frmTel = new FrmSendCardInputTel(idinfo);
                frmTel.IdInfo = idinfo;
                if (frmTel.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    TelePhone = frmTel.TelePhone;
                }
                else
                {
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return(false);
                }
            }
            else
            {
                string           TelePhone = string.Empty;
                FrmInputForChild frmChild  = new FrmInputForChild(idinfo);
                frmChild.IdInfo = idinfo;
                if (frmChild.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    TelePhone = frmChild.TelePhone;
                }
                else
                {
                    idinfo      = null;
                    ucTime1.Sec = 60;
                    ucTime1.timer1.Start();
                    return(false);
                }
            }

            ucTime1.Sec = 60;

            return(true);

            #endregion
        }