public void T01_Check_tradebycredit()
        {
            //供应商登陆
            TestUserSignIn(UN1, PW1);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH1);

            //退出功能,

            SignOut so = new SignOut();
            so.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN, PW);

            //采购商购买
            placeordertradebycredit pl = new placeordertradebycredit();
            pl.TestUserplaceordertradebycredit(browser, targetHost, MT, DT1, NUM, OT2, BU);

            //可提资源
            ladingbillsearch ld1 = new ladingbillsearch();
            string temp = placeordertradebycredit.orderid1;
            string orderid1 = temp.Trim().Substring(0, 10);
            ld1.TestUserladingbillsearch(browser, targetHost, orderid1);

            //可提资源管理
            ladbillmanageadmin lm1 = new ladbillmanageadmin();
            lm1.TestUserladingbillmanageadmin(browser, targetHost);
        }
        public void T01_Check_bargaining()
        {
            //供应商用户登陆
            TestUserSignIn(UN1, PW1);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH1);

            changesourcetype ch1 = new changesourcetype();
            ch1.TestUserchangesourcetype(browser,PRT1);

            //退出功能,

            SignOut so = new SignOut();
            so.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN2, PW2);

            //采购商议价
            bargainingorder bo1 = new bargainingorder();
            bo1.TestUserbargainingorder(browser, targetHost, MT, DT1, NUM, OT, BU1);

            //退出功能,

            SignOut so1 = new SignOut();
            so1.TestUserSignOut(browser);

            //议价操作员登陆
            TestUserSignIn(SYJ,SYJPW);

            verifybargain ve1 = new verifybargain();
            ve1.TestUserverifylad(browser);
        }
        public void T01_Check_salesourcefail()
        {
            //供应商用户登陆
            TestUserSignIn(UN4, PW4);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH3);

            browser.Link(Find.ByText("资源撤牌管理")).Click();
            browser.WaitUntilContainsText("本页可选择需要撤牌的资源,进行撤牌。");
            Assert.IsTrue(browser.ContainsText("本页可选择需要撤牌的资源,进行撤牌。"));
            Assert.IsTrue(browser.ContainsText("未查询到您想要的数据,请扩大您的查询范围。"));

            browser.Link(Find.ByText("资源挂牌")).Click();
            browser.WaitUntilContainsText("可选择以下两种上传方式");
            Assert.IsTrue(browser.ContainsText("可选择以下两种上传方式"));

            WatiN.Core.DialogHandlers.ConfirmDialogHandler dh = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();

            browser.AddDialogHandler(dh);

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_deleteallbtn")).ClickNoWait();
            dh.WaitUntilExists(15);//

            dh.OKButton.Click();//
            dh.WaitUntilExists(15);

            dh.OKButton.Click();
            browser.RemoveDialogHandler(dh);
            browser.WaitUntilContainsText("未查询到您想要的数据");
            Assert.IsTrue(browser.ContainsText("未查询到您想要的数据"));
        }
        public void T01_Check_2ndorder_halfpayment()
        {
            //平台用户登陆
            TestUserSignIn(UN, PW);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH);

            //退出功能,

            SignOut so = new SignOut();
            so.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN2, PW2);

            //采购商购买
            placeorder pl = new placeorder();
            pl.TestUserplaceorder(browser, targetHost, MT, DT1, NUM, OT1, BU);

            //合同付款
            fullpay fl = new fullpay();
            fl.TestUserfullpay(browser, PY2);

            //定金付款
            halfpay hfl = new halfpay();
            hfl.TestUserhalfpay(browser, PY2);

            //可提资源
            ladingbillsearch ld1 = new ladingbillsearch();
            string orderid = fullpay.orderid;
            ld1.TestUserladingbillsearch(browser, targetHost, orderid);

            //可提资源管理
            ladbillmanage lm1 = new ladbillmanage();
            lm1.TestUserladingbillmanage(browser, targetHost);

            //提单密码查询
            messagesql mes1 = new messagesql();
            mes1.TestUsermessagesql(browser, TID);

            //退出功能,
            SignOut so1 = new SignOut();
            so1.TestUserSignOut(browser);

            //仓库用户登陆
            TestUserSignIn(CK, CKPW);

            verifylad V1 = new verifylad();
            string ladid = messagesql.ladid;
            string ladpw = messagesql.ladpw;
            V1.TestUserverifylad(browser, ladid, ladpw);
        }
        public void T01_Check_3rdorder_fullpayment()
        {
            //供应商用户登陆
            TestUserSignIn(UN1, PW1);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH1);

            //退出功能,

            SignOut so = new SignOut();
            so.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN2, PW2);

            //采购商购买
            placeorder pl = new placeorder();
            pl.TestUserplaceorder(browser, targetHost, MT, DT1, NUM, OT, BU);

            //付款
            fullpay fl = new fullpay();
            fl.TestUserfullpay(browser, PY2);

            //退出功能,

            SignOut so1 = new SignOut();
            so1.TestUserSignOut(browser);

            //平台登陆
            TestUserSignIn(UN, PW);

            //gototrade
            gototrade gt1 = new gototrade();
            gt1.TestUsergototrade(browser);

            //可提资源
            ladingbillsearch ld1 = new ladingbillsearch();
            string orderid = fullpay.orderid;

            int o1 = int.Parse(orderid);
            int o2 = o1 + 1;
            string orderid1 = o2.ToString();
            ld1.TestUserladingbillsearch(browser, targetHost, orderid1);

            //可提资源管理
            ladbillmanageadmin lm1 = new ladbillmanageadmin();
            lm1.TestUserladingbillmanageadmin(browser, targetHost);

            //退出功能,

            SignOut so2 = new SignOut();
            so2.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN2, PW2);

            //gototrade
            gototrade gt2 = new gototrade();
            gt2.TestUsergototrade(browser);

            //可提资源
            ladingbillsearch ld2 = new ladingbillsearch();
            ld2.TestUserladingbillsearch(browser, targetHost, orderid);

            //可提资源管理
            ladbillmanage lm2 = new ladbillmanage();
            lm2.TestUserladingbillmanage(browser, targetHost);

            //提单密码查询
            messagesql mes1 = new messagesql();
            mes1.TestUsermessagesql(browser, TID);

            //退出功能,
            SignOut so3 = new SignOut();
            so3.TestUserSignOut(browser);

            //仓库用户登陆
            TestUserSignIn(SCK, SCKPW);

            verifylad V1 = new verifylad();
            string ladid = messagesql.ladid;
            string ladpw = messagesql.ladpw;
            V1.TestUserverifylad(browser, ladid, ladpw);
        }
        public void T01_Check_discount()
        {
            //供应商登陆
            TestUserSignIn(UN1, PW1);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH1);

            //退出功能,

            SignOut so = new SignOut();
            so.TestUserSignOut(browser);

            //平台登陆
            TestUserSignIn(UN, PW);
            //gototrade
            gototrade gt3 = new gototrade();
            gt3.TestUsergototrade(browser);

            //设置折扣
            adddiscount ad1 = new adddiscount();
            ad1.TestUseradddiscount(browser, DT);

            //退出功能,

            SignOut so1 = new SignOut();
            so1.TestUserSignOut(browser);

            //采购商登陆
            TestUserSignIn(UN2, PW2);

            //采购商购买
            checkdiscount ck1 = new checkdiscount();
            ck1.TestUsercheckdiscount(browser, targetHost, MT, DT1, NUM);

            //退出功能,

            SignOut so2 = new SignOut();
            so2.TestUserSignOut(browser);

            //供应商登陆
            TestUserSignIn(UN1, PW1);

            cancelsource ce1 = new cancelsource();
            ce1.TestUsercancelsource(browser);

            SignOut so4 = new SignOut();
            so4.TestUserSignOut(browser);

            //平台登陆
            TestUserSignIn(UN, PW);

            //gototrade
            gototrade gt4 = new gototrade();
            gt4.TestUsergototrade(browser);

            string raid = adddiscount.raid;
            string temp = raid.Trim().Substring(6, 12);
            canceldiscont cs1 = new canceldiscont();
            cs1.TestUsercanceldiscont(browser,raid,temp);
        }