Пример #1
0
        private bool CheckNotepad(List <string> slit, PcommCore pc)
        {
            bool pass = true;

            pc.LinkToScreen <SJ672>((SJ672) =>
            {
                var str = SJ672.getContent().ToUpper();
                foreach (string s in slit)
                {
                    if (str.Contains(s.ToUpper()) && !string.IsNullOrEmpty(s))
                    {
                        pass = false;
                        break;
                    }
                }
                base.SendKey(KeyBoard.PF3);
                return(true);
            });
            if (!pass)
            {
                pc.SkipToHomeScreen <S0017>();
            }
            else
            {
                CommonScreen comm       = pc.GetScreen <CommonScreen>();
                string       screenCode = comm.GetText(1, 72, 80);
                if (screenCode.Contains("SJ672"))
                {
                    CheckNotepad(slit, pc);
                }
            }
            return(pass);
        }
Пример #2
0
        public void TestSelectCaseInSN018()
        {
            PcommCore pcommCore = new PcommCore("A");
            SN018     sn018     = pcommCore.GetScreen <SN018>();

            sn018.SelectClientNO("98039761");
        }
Пример #3
0
        public void SM799SkipToSJ671()

        {
            PcommCore pcommCore = new PcommCore("A");
            SM799     s_sm7799  = pcommCore.GetScreen <SM799>();

            //s_sm7799.Set_F2();
            s_sm7799.Set_ShiftF8();
        }
Пример #4
0
        public void PcommCoreTestsSetCursorPos()
        {
            PcommCore pcommCore = new PcommCore("A");

            pcommCore.LinkToScreen <IBM_i_Main_MenuScreen>((IBM_i_Main_MenuScreen) =>
            {
                CursorPos point = IBM_i_Main_MenuScreen.SearchText("User tasks");

                return(true);
            });
        }
Пример #5
0
        public void SetCodeInSG761(string[] codes, PcommCore pcommCore)
        {
            for (int i = 0; i < codes.Length; i++)
            {
                if (codes[i].Length == 1)
                {
                    codes[i] = "0" + codes[i];
                }
            }
            List <CodeModel> codeList = new List <CodeModel>();

            Thread.Sleep(500);
            //List<string> msgList = base.ReadRows(9, 22);
            for (int row = 12; row < 22; row++)
            {
                CodeModel model = new CodeModel
                {
                    code = base.GetText(row, 4, 2).Trim(),
                    row  = row
                };
                codeList.Add(model);
            }
            var selectedList = codeList.Where(t => codes.Contains(t.code));

            foreach (var mode in selectedList)
            {
                SetText("Y", mode.row, 76);
            }
            if (IsHaveNext())
            {
                PageDown();
                SetCodeInSG761(codes, pcommCore);
                //List
            }
            else//如果是最后一页则对Code进行操作
            {
                CodeModel code99 = codeList.Where(t => t.code == "99").FirstOrDefault();
                if (code99 != null)
                {
                    SetText("X", code99.row, 60);
                    SetText("Y", code99.row, 76);
                    SendKey(KeyBoard.Enter);
                    //PcommCore.PcommCore pcommCore = new PcommCore.PcommCore("A");
                    SG763 sg763 = pcommCore.GetScreen <SG763>();
                    sg763.SetRemark("Please be reminded to submit statement to certify signature if necessary next time.");
                    SetEnter();
                }
            }
        }
Пример #6
0
        public bool NotePadPass(List <string> slit, PcommCore pc)
        {
            bool pass = true;

            Thread.Sleep(1000);
            if (string.IsNullOrEmpty(GetText(10, 4, 8).Trim()))
            {
                return(pass);
            }
            if (base.NotepadHeaderIsHaveNext())
            {
                for (int row = 10; row < 20; row++)
                {
                    string schemeID = GetText(row, 4, 8).Trim();
                    if (string.IsNullOrEmpty(schemeID))
                    {
                        break;
                    }
                    else
                    {
                        base.SetText("Y", row, 2);
                    }
                }
                base.PageDown();
                pass = NotePadPass(slit, pc);
            }
            else if (base.NotepadHeaderIsBottom())
            {
                for (int row = 10; row < 19; row++)
                {
                    string schemeID = GetText(row, 4, 8).Trim();
                    if (string.IsNullOrEmpty(schemeID))
                    {
                        break;
                    }
                    else
                    {
                        base.SetText("Y", row, 2);
                    }
                }
                SendKey(KeyBoard.Enter);
                pass = CheckNotepad(slit, pc);
            }
            //SendKey(KeyBoard.Enter);
            //pass=CheckNotepad(slit,pc);
            return(pass);
        }
Пример #7
0
        public bool loopSecheme_id(List <string> slit, int row, PcommCore pc)
        {
            bool keyword = false;

            if (string.IsNullOrEmpty(base.ReadRow(row)))

            {
                Message.Add("row data is empty");
                // throw new Exception("row data is empty");
            }
            else
            {
                base.SetText("Y", row, 2);
                base.Enter();
                row++;

                if (row == 20)
                {
                    //throw new Exception("read data was completed");
                    Message.Add("row data is empty");
                }
                pc.LinkToScreen <SJ672>((SJ672) =>
                {
                    var str = SJ672.getContent();
                    slit.ForEach(x => {
                        if (str.Contains(x) && !string.IsNullOrEmpty(x))
                        {
                            keyword = true;
                            Message.Add(x + "key word is exsits");
                            base.SendKey(KeyBoard.PF3);
                            return;
                            //throw new Exception(x + "key word is exsits");
                            //throw new Exception(x + "key word is exsits");
                        }
                        //else
                        //{
                        //    base.SendKey(KeyBoard.PF3);
                        //}
                    });
                    base.SendKey(KeyBoard.PF3);
                    return(true);
                });
            }
            return(keyword);
        }
Пример #8
0
        public void PcommCoreTest()
        {
            PcommCore pcommCore = new PcommCore("A");

            pcommCore.LinkToScreen <IBM_i_Main_MenuScreen>((IBM_i_Main_MenuScreen) =>
            {
                IBM_i_Main_MenuScreen.SetCursorPos(2, 4);
                List <string> names = IBM_i_Main_MenuScreen.pcommSessionNames();
                string errorMsg     = string.Empty;
                string message      = IBM_i_Main_MenuScreen.GetTextRect(7, 6, 7, 80);
                IBM_i_Main_MenuScreen.SetText("1", 20, 7);
                bool isSkip = IBM_i_Main_MenuScreen.isSkipScreen(out errorMsg);
                return(isSkip);
            }).LinkToScreen <User_TasksScreen>((User_TasksScreen) =>
            {
                User_TasksScreen.SetText("1", 20, 7);
                return(true);
            }).LinkToScreen <CommonScreen>((commonScreen) =>
            {
                commonScreen.SendKey(KeyBoard.PA1);
                commonScreen.SendKey(KeyBoard.PF3);
                return(false);
            });
        }
Пример #9
0
        public bool SelectSchemeID(List <string> slit, int row, PcommCore pc)
        {
            bool isKeyword = false;

            if (base.NotepadHeaderIsHaveNext())
            {
                isKeyword = loopSecheme_id(slit, row, pc);
                if (isKeyword == true)
                {
                    return(true);
                }
                else
                {
                    base.PageDown();
                    SelectSchemeID(slit, row, pc);
                }
            }
            else if (base.NotepadHeaderIsBottom())
            {
                isKeyword = loopSecheme_id(slit, row, pc);
            }

            return(isKeyword);
        }
Пример #10
0
        public void PcommCoreSkipToHomeScreen()
        {
            PcommCore pcommCore = new PcommCore("A");

            pcommCore.SkipToHomeScreen <IBM_i_Main_MenuScreen>();
        }