Example #1
0
        /// <summary>
        /// 从接口获取人员信息
        /// </summary>
        /// <param name="datasetName"></param>
        /// <param name="inter"></param>
        /// <returns></returns>
        private List <PersonInfo> GetInterfacePersonInfo(string datasetName, Interface inter)
        {
            string errorInfo = inter.GetMessage();

            try
            {
                List <PersonInfo> list = new List <PersonInfo>();

                inter.SetResultset(datasetName);

                string str = string.Empty;

                long rowTotalCount = inter.GetRowCount();

                do
                {
                    PersonInfo personInfo = new PersonInfo();

                    str = string.Empty;
                    inter.GetByName("indi_id", ref str);
                    personInfo.indi_id = str;

                    str = string.Empty;
                    inter.GetByName("center_id", ref str);
                    personInfo.center_id = str;

                    str = string.Empty;
                    inter.GetByName("center_name", ref str);
                    personInfo.center_name = str;

                    str = string.Empty;
                    inter.GetByName("name", ref str);
                    personInfo.name = str;

                    str = string.Empty;
                    inter.GetByName("sex", ref str);
                    personInfo.sex = str;

                    str = string.Empty;
                    inter.GetByName("pers_type", ref str);
                    personInfo.pers_type = str;

                    str = string.Empty;
                    inter.GetByName("pers_name", ref str);
                    personInfo.pers_name = str;

                    str = string.Empty;
                    inter.GetByName("indi_join_sta", ref str);
                    personInfo.indi_join_sta = str;

                    str = string.Empty;
                    inter.GetByName("indi_sta_name", ref str);
                    personInfo.indi_sta_name = str;

                    str = string.Empty;
                    inter.GetByName("official_code", ref str);
                    personInfo.official_code = str;

                    str = string.Empty;
                    inter.GetByName("official_name", ref str);
                    personInfo.official_name = str;

                    str = string.Empty;
                    inter.GetByName("hire_type", ref str);
                    personInfo.hire_type = str;

                    str = string.Empty;
                    inter.GetByName("hire_name", ref str);
                    personInfo.hire_name = str;

                    str = string.Empty;
                    inter.GetByName("idcard", ref str);
                    personInfo.idcard = str;

                    str = string.Empty;
                    inter.GetByName("insr_code", ref str);
                    personInfo.insr_code = str;

                    str = string.Empty;
                    inter.GetByName("telephone", ref str);
                    personInfo.telephone = str;

                    str = string.Empty;
                    inter.GetByName("birthday", ref str);
                    personInfo.birthday = str;

                    str = string.Empty;
                    inter.GetByName("post_code", ref str);
                    personInfo.post_code = str;

                    str = string.Empty;
                    inter.GetByName("corp_id", ref str);
                    personInfo.corp_id = str;

                    str = string.Empty;
                    inter.GetByName("corp_name", ref str);
                    personInfo.corp_name = str;

                    str = string.Empty;
                    inter.GetByName("freeze_sta", ref str);
                    personInfo.freeze_sta = str;

                    str = string.Empty;
                    inter.GetByName("last_balance", ref str);
                    personInfo.last_balance = str;

                    list.Add(personInfo);
                } while (0 < inter.NextRow());

                return(list);
            }
            catch (Exception ex)
            {
                throw new Exception(errorInfo + "\n" + ex.Message);
            }
        }
Example #2
0
        /// <summary>
        /// 获取病人的个人基本信息
        /// </summary>
        /// <param name="listPara">参数列表</param>
        /// <returns>获取病人的个人基本信息</returns>
        public List <PersonInfo> GetPersonInfo(List <Parameter> listPara)
        {
            Interface         inter = new Interface(this.InterfaceHN);
            List <PersonInfo> list  = new List <PersonInfo>();

            long   value     = inter.ExecInterface("BIZC131101", listPara);
            string errorInfo = inter.GetMessage();

            if (0 > value)
            {
                throw new Exception("通过个人标识(电脑号、姓名、公民身份号、IC卡号)取参保人信息失败,失败原因:" + inter.GetMessage());
            }

            inter.SetResultset("personinfo");

            string str = string.Empty;

            try
            {
                do
                {
                    PersonInfo personInfo = new PersonInfo();

                    str = string.Empty;
                    inter.GetByName("indi_id", ref str);
                    personInfo.indi_id = str;

                    str = string.Empty;
                    inter.GetByName("center_id", ref str);
                    personInfo.center_id = str;

                    str = string.Empty;
                    inter.GetByName("center_name", ref str);
                    personInfo.center_name = str;

                    str = string.Empty;
                    inter.GetByName("name", ref str);
                    personInfo.name = str;

                    str = string.Empty;
                    inter.GetByName("sex", ref str);
                    personInfo.sex = str;

                    str = string.Empty;
                    inter.GetByName("pers_type", ref str);
                    personInfo.pers_type = str;

                    str = string.Empty;
                    inter.GetByName("pers_name", ref str);
                    personInfo.pers_name = str;

                    str = string.Empty;
                    inter.GetByName("indi_join_sta", ref str);
                    personInfo.indi_join_sta = str;

                    str = string.Empty;
                    inter.GetByName("indi_sta_name", ref str);
                    personInfo.indi_sta_name = str;

                    str = string.Empty;
                    inter.GetByName("official_code", ref str);
                    personInfo.official_code = str;

                    str = string.Empty;
                    inter.GetByName("official_name", ref str);
                    personInfo.official_name = str;

                    str = string.Empty;
                    inter.GetByName("hire_type", ref str);
                    personInfo.hire_type = str;

                    str = string.Empty;
                    inter.GetByName("hire_name", ref str);
                    personInfo.hire_name = str;

                    str = string.Empty;
                    inter.GetByName("idcard", ref str);
                    personInfo.idcard = str;

                    str = string.Empty;
                    inter.GetByName("insr_code", ref str);
                    personInfo.insr_code = str;

                    str = string.Empty;
                    inter.GetByName("telephone", ref str);
                    personInfo.telephone = str;

                    str = string.Empty;
                    inter.GetByName("birthday", ref str);
                    personInfo.birthday = str;

                    str = string.Empty;
                    inter.GetByName("post_code", ref str);
                    personInfo.post_code = str;

                    str = string.Empty;
                    inter.GetByName("corp_id", ref str);
                    personInfo.corp_id = str;

                    str = string.Empty;
                    inter.GetByName("corp_name", ref str);
                    personInfo.corp_name = str;

                    str = string.Empty;
                    inter.GetByName("freeze_sta", ref str);
                    personInfo.freeze_sta = str;

                    str = string.Empty;
                    inter.GetByName("last_balance", ref str);
                    personInfo.last_balance = str;

                    list.Add(personInfo);
                } while (0 < inter.NextRow());

                return(list);
            }
            catch (Exception ex)
            {
                throw new Exception(errorInfo + "\n" + ex.Message);
            }
        }