Ejemplo n.º 1
0
        public SWfsProductService()
        {
            if (_agent == null)
            {
                _agent = new WebServiceAgent(AppSettingManager.AppSettings["ErpInventoryService"]);
            }

            if (string.IsNullOrEmpty(_key))
            {
                _key = _agent.Invoke("GetSkuNoCacheKeyFormatString").ToString();
            }
        }
Ejemplo n.º 2
0
 public override string Business(params object[] args)
 {
     return(OnBusiness(o =>
     {
         var s = String.Empty;
         if (args[(args.Length - 1)].ToString() == "1")
         {
             if ("HisUrl2".ConfigValue().IsNullOrEmptyOfVar())
             {
                 throw new Exception("appSettings 缺少 HisUrl2 的值");
             }
             //return ToolsContainer.Post("HisUrl2".ConfigValue(), o[1].ToString());
             return WebRequestAgent.Post("HisUrl2".ConfigValue(), o[1].ToString());
         }
         else
         {
             var x = _HISClient.Invoke("Etrack_ProcInterface", o[0].ToString(), s);
             if (x[1].ToString().IsNullOrEmptyOfVar())
             {
                 throw new Exception("HIS错误:" + x[1].ToString());
             }
             return x[1].ToString();
         }
     }, args));
 }
Ejemplo n.º 3
0
        public ActionResult CheckMember()
        {
            string returnMsg = string.Empty;
            string mobile    = string.Empty;//手机号

            // var agent = new WebServiceAgent(WebConfigurationManager.AppSettings["wentangService"]);

            var agent = new WebServiceAgent(CommonService.GetSysConfig("WentangshequService", ""));

            var     methods   = agent.Methods;
            dynamic resultd   = agent.Invoke("SelectNew", "WechatID", ViewBag.WeChatUserID);
            var     objRet    = JsonConvert.DeserializeObject(resultd);
            int     intStatus = objRet.Status;

            //var wechatBaseUrl = CommonService.GetSysConfig("WeChatUrl", "");

            switch (intStatus)
            {
            case 1:
                returnMsg      = "操作成功";
                ViewBag.Mobile = objRet.Mobile;
                //ViewBag.Url = WebConfigurationManager.AppSettings["doctorOnline"] + objRet.Mobile;
                ViewBag.Url = CommonService.GetSysConfig("doctorOnline", "") + objRet.Mobile;
                break;

            case 2:
                returnMsg      = "没找到会员";
                ViewBag.Mobile = "";
                //ViewBag.RegisterUrl = WebConfigurationManager.AppSettings["register"];
                ViewBag.RegisterUrl = CommonService.GetSysConfig("register", "");
                break;

            case 3:
                returnMsg      = "查询到多个会员";
                ViewBag.Mobile = "3";
                break;

            case -99:
                returnMsg      = "系统异常";
                ViewBag.Mobile = "-99";
                break;

            case -1:
                returnMsg      = "参数不正确";
                ViewBag.Mobile = "-1";
                break;

            default:
                returnMsg      = objRet.Remark;
                ViewBag.Mobile = "";
                break;
            }


            return(View());
        }
Ejemplo n.º 4
0
        //public static bool get
        //    ws_GetUTMDistance (string dkpre, double mileage, out double x, out double y, out double z)
        /// <summary>
        /// ToDO
        /// </summary>
        /// <param name="projSNo"></param>
        /// <returns></returns>
        public static DataSet findProjHistory(string projSNo)
        {
            DataSet ds = null;

            if (isConnected)
            {
                ds = (DataSet)mProjectAgent.Invoke("ws_Bind_ProjectProgress_HistoryRate_DataSet", projSNo);
            }
            return(ds);
        }
Ejemplo n.º 5
0
        public static string webLogin(string usrName, string usrPWD)
        {
            string resultStr = "NotConnected";

            if (isConnected)
            {
                resultStr = (string)mLoginAgent.Invoke("CheckUsrLogin", usrName, usrPWD);
            }
            return(resultStr);
        }
Ejemplo n.º 6
0
 public override string Business(params object[] args)
 {
     if (_HISClient == null)
     {
         _HISClient = new WebServiceAgent("HisUrl".ConfigValue());
     }
     return(OnBusiness(o =>
     {
         var s = String.Empty;
         var x = _HISClient.Invoke("Etrack_ProcInterface", o[0].ToString(), s);
         if (x[1].ToString().IsNullOrEmptyOfVar())
         {
             throw new Exception("HIS错误:" + x[1].ToString());
         }
         return x[1].ToString();
     }, args));
 }
Ejemplo n.º 7
0
        public static string webLogin(string usrName, string usrPWD)
        {
            string resultStr = "NotConnected";

            if (isConnected)
            {
                Object obj = mLoginAgent.Invoke("CheckUsrLogin", usrName, usrPWD);
                if (obj == null)
                {
                    resultStr = "NotConnected";
                }
                else
                {
                    resultStr = obj.ToString();
                }
            }
            return(resultStr);
        }
        public JsonResult SendSocialDataToBack(int appId, string SocialChannel, string SocialType, string SocialSubject, string SocialContent)
        {
            try
            {
                _Logger.Debug("openId:{0}", ViewBag.WeChatUserID);
                string openId = ViewBag.WeChatUserID;
                if (!string.IsNullOrEmpty(openId) && appId == 27)
                {
                    var agent        = new WebServiceAgent(CommonService.GetSysConfig("WentangshequService", ""));
                    var methods      = agent.Methods;
                    var sendtoAvator = agent.Invoke("AddSocialData", "WechatID", openId, SocialChannel, SocialType, SocialSubject, SocialContent);

                    _Logger.Debug("UpdateCustomerNo WechatID:{0} 社交数据类型:{1} 社交数据主题:{2}", openId, SocialType, SocialSubject);

                    dynamic resultd = JsonConvert.DeserializeObject(sendtoAvator.ToString());
                    _Logger.Debug("send success status: {0}, remark:{1} ", resultd.Status, resultd.Remark);
                }
            }
            catch (Exception e)
            {
                _Logger.Error(e);
            }
            return(Json("ok"));
        }
Ejemplo n.º 9
0
        ////        [WebMethod(Description = "增量获取工点信息")]
        ////[System.Web.Services.Protocols.SoapHeader("AuthHeader")]
        //    public static List<CRailwayProject> findChangedProj(string updateTime)
        //    {
        //        List<CRailwayProject> proList = null;
        //        if (isConnected)
        //        {

        //            proList = (List<CRailwayProject>)mProjectAgent.Invoke("FindChangedProject", updateTime);
        //        }
        //        return proList;
        //    }

        public static string findProjectCode(string projStr)
        {
            return(mGisAgent.Invoke("ws_GetSysConfigation", projStr).ToString());
        }
Ejemplo n.º 10
0
        ////        [WebMethod(Description = "增量获取工点信息")]
        ////[System.Web.Services.Protocols.SoapHeader("AuthHeader")]
        //    public static List<CRailwayProject> findChangedProj(string updateTime)
        //    {
        //        List<CRailwayProject> proList = null;
        //        if (isConnected)
        //        {

        //            proList = (List<CRailwayProject>)mProjectAgent.Invoke("FindChangedProject", updateTime);
        //        }
        //        return proList;
        //    }


        public static string findProjectCode(string projStr)
        {
            if (isConnected)
            {
                Object obj = mGisAgent.Invoke("ws_GetSysConfigation", projStr);
                if (obj == null)
                {
                    return(null);
                }
                else
                {
                    return(obj.ToString());
                }
            }
            return(null);
        }