Example #1
0
        private void SyncApprove(string cOrderNumber)
        {
            VLogError(@"销售出库" + cOrderNumber, "开始调用easWebservices" + DateTime.Now);
            var cName         = Properties.Settings.Default.EasUserName;
            var cPwd          = Properties.Settings.Default.EasUserPwd;
            var easDataCenter = Properties.Settings.Default.EasDataCenter;
            var easproxy      = new EASLoginProxyService();

            easproxy.Url = Properties.Settings.Default.EasLoginUrl;
            //proxy.Url = Global.oaUrl + "/ormrpc/services/EASLogin?wsdl";
            //WSContext ctx = easproxy.login(name, pwd, "eas", "a", "L2", 2, "BaseDB");
            var ctx = easproxy.login(cName, cPwd, "eas", easDataCenter, "L2", 2, "BaseDB");

            if (ctx.sessionId != null)
            {
                //正确登录
            }
            else
            {
                VLogError(@"销售出库", cOrderNumber + "::用户名或密码错误!!");
            }

            var proxy = new WSWSYofotoFacadeSrvProxyService();

            proxy.Url = Properties.Settings.Default.EasApproveUrl;
            var msg = proxy.auditSaleIssueBill("S.01", cOrderNumber);

            VLogError(@"销售出库" + cOrderNumber, "调用easWebservices结束" + DateTime.Now);
            VLogError(@"销售出库", cOrderNumber + "::" + msg);
        }
Example #2
0
        private void SyncApprove(string cOrderNumber, int i)
        {
            //VLogError(@"销售出库" + cOrderNumber, "开始调用easWebservices" + DateTime.Now);
            var cName         = txtUser.Text;
            var cPwd          = txtPwd.Text;
            var easDataCenter = txtDataCenter.Text;
            var easproxy      = new EASLoginProxyService();

            easproxy.Url = "http://" + txtUrl.Text + "/ormrpc/services/EASLogin";
            //proxy.Url = Global.oaUrl + "/ormrpc/services/EASLogin?wsdl";
            //WSContext ctx = easproxy.login(name, pwd, "eas", "a", "L2", 2, "BaseDB");
            var ctx = easproxy.login(cName, cPwd, "eas", easDataCenter, "L2", 2, "BaseDB");

            if (ctx.sessionId != null)
            {
                //正确登录
            }
            else
            {
                //VLogError(@"销售出库", cOrderNumber + "::用户名或密码错误!!");
                uGridOutBox.Rows[i].Cells["cResult"].Value = "用户名或密码错误";
            }

            var proxy = new WSWSYofotoFacadeSrvProxyService();

            proxy.Url = "http://" + txtUrl.Text + "/ormrpc/services/WSWSYofotoFacade";
            var msg = proxy.auditSaleIssueBill("S.01", cOrderNumber);

            uGridOutBox.Rows[i].Cells["cResult"].Value = msg;
            //VLogError(@"销售出库" + cOrderNumber, "调用easWebservices结束" + DateTime.Now);
            //VLogError(@"销售出库", cOrderNumber + "::" + msg);
        }