コード例 #1
0
 public string confirmpolicy(policy obj)
 {
     object[] results = this.Invoke("confirmpolicy", new object[] {
         obj
     });
     return((string)(results[0]));
 }
コード例 #2
0
 /// <remarks/>
 public void confirmpolicyAsync(policy obj, object userState)
 {
     if ((this.confirmpolicyOperationCompleted == null))
     {
         this.confirmpolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnconfirmpolicyOperationCompleted);
     }
     this.InvokeAsync("confirmpolicy", new object[] {
         obj
     }, this.confirmpolicyOperationCompleted, userState);
 }
コード例 #3
0
        /// <summary>
        /// 投保
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public IssuingResultEntity Issue(IssueEntity entity)
        {
            IssuingResultEntity result = new IssuingResultEntity();
            policy po = new policy();

            po.userid     = "hgy02";
            po.password   = "******";
            po.PlanNo     = "";
            po.begdate    = entity.EffectiveDate.ToString("yyyy-MM-dd");
            po.App_name   = entity.Name;
            po.IDType     = GetIdType(entity.IDType);
            po.App_id     = entity.ID;
            po.App_cellno = entity.PhoneNumber;
            po.GoflightNo = entity.FlightNo;
            po.OPER_DATE  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            if (string.IsNullOrEmpty(po.App_cellno))
            {
                //模拟电话号码
                string   no    = DateTime.Now.Ticks.ToString();
                string[] type  = { "130", "131", "132", "155", "156", "186", "133", "153", "189", "180" };
                int      index = random.Next(0, type.Length);
                po.App_cellno = type[index] + no.Substring(no.Length - 8);
            }

            string ret = string.Empty;

            try
            {
                ret = webService.confirmpolicy(po);

                if (string.IsNullOrEmpty(ret))
                {
                    throw new Exception("Huayubaoxian WebService返回为空!");
                }
            }
            catch (Exception e)
            {
                Common.LogIt(webService.Url + e.ToString());
                result.Trace.Detail = e.Message;
                return(result);
            }

            //Common.LogIt("Huayubaoxian Issue:" + ret);
            if (StringHelper.MiscelHelper.IsNumeric(ret))
            {
                result.PolicyNo = ret;
            }
            else
            {
                string request = Common.XmlSerialize <policy>(po);
                Common.LogIt("投保参数" + request + System.Environment.NewLine + "Huayubaoxian投保:" + ret);
                result.Trace.ErrorMsg = ret;
            }
            return(result);
        }
コード例 #4
0
 /// <remarks/>
 public void confirmpolicyAsync(policy obj)
 {
     this.confirmpolicyAsync(obj, null);
 }
コード例 #5
0
 /// <remarks/>
 public System.IAsyncResult Beginconfirmpolicy(policy obj, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("confirmpolicy", new object[] {
         obj
     }, callback, asyncState));
 }