Ejemplo n.º 1
0
        /// <summary>
        /// 上传或更新照片
        /// </summary>
        /// <returns></returns>
        public static string[] nhPicOnload(string grbm, string ylzh, string cardno, string sickname,
                                           string picStr, string hospcode, string voperator)
        {
            PhotoServiceInterfacePortTypeClient client = null;

            try
            {
                string           v_year  = DateTime.Now.Year.ToString();
                BasicHttpBinding binding = new BasicHttpBinding();
                binding.ReaderQuotas = new XmlDictionaryReaderQuotas()
                {
                    MaxStringContentLength = 883647
                };

                client = new PhotoServiceInterfacePortTypeClient(binding, new EndpointAddress("http://jk.gzxnh.gov.cn/xfirephoto/services/PhotoServiceInterface"));

                string[] RetArr = ArrayToStrings(client.save(NHClient.getAreaId(ylzh), grbm, ylzh, cardno, sickname, picStr, hospcode, voperator));
                if (RetArr == null)
                {
                    throw new Exception("上传照片信息失败");
                }
                if (RetArr[0].Equals("1")) //失败情况
                {
                    throw new Exception("上传照片信息失败,原因【" + RetArr[1] + "】-nh");
                }
                return(RetArr);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (client != null)
                {
                    client.Close();
                }
            }
        }
Ejemplo n.º 2
0
        public static NHHomeInfo BindNHPeoList(string nhyear, ComboBox com, TextBox nhzh)
        {
            NHHomeInfo peo = null;

            if (nhzh.Text.Trim().Length == 0)
            {
                WJs.alert("农合证号不能为空!");
                nhzh.Focus();
                return(null);
            }
            try
            {
                com.Items.Clear();
                peo = NHClient.GetHomeInfo(nhyear, nhzh.Text.Trim());

                List <NHPeoInfo> lis = NHClient.GetPeoList(nhyear, nhzh.Text.Trim());

                if (lis != null && lis.Count > 0)
                {
                    com.Items.Add("请选择农合病人");
                    com.DisplayMember = "Xm";
                    foreach (NHPeoInfo p in lis)
                    {
                        com.Items.Add(p);
                    }
                    //com.Text = peo.Hzxm;
                    //Application.DoEvents();
                    //com.SelectedIndex = 1;
                    //com.Focus();
                }
            }
            catch (Exception e) {
                WJs.alert(e.Message);
                nhzh.Focus();
            }
            return(peo);
        }
Ejemplo n.º 3
0
        public static string[] SubmitMzInfo(string nhyear, RegisterInfo nhInfo, List <RegisterMx> mxLi, decimal zje, out string nhmzh)
        {
            nhmzh = NHClient.SubmitMZInfo(nhyear, nhInfo, mxLi);

            string[] ret = NHClient.MzJs(nhyear, nhInfo.Ylzh, nhmzh, false);

            decimal tol = decimal.Parse(ret[13]);//得到预结算后的总费用;

            if (Math.Abs(tol - zje) > decimal.Parse("0.1"))
            { //出现差额则删除原门诊信息重新上传;
                try
                {
                    NHClient.DelMzXX(nhInfo.Ylzh, nhmzh);
                }
                catch (Exception Ed)
                {
                    WJs.alert("删除前一次门诊暂存数据出错," + Ed.Message); //throw Ed;
                    return(null);
                }
                nhmzh = NHClient.SubmitMZInfo(nhyear, nhInfo, mxLi);
                ret   = NHClient.MzJs(nhyear, nhInfo.Ylzh, nhmzh, false);
            }
            return(ret);
        }