//public void SelectCase(SH795AccoutModel model,string scheme_Name, List<SH795AccoutModel> entityList, int selCol = 3, int stsCol = 66) //{ // is_findcase = true; // for(int i=1;i<model.pageIndex;i++) // { // //SendKey(KeyBoard.PF3); // base.PageDown(); // } // base.SetText("Y", model.rowIndex, selCol); // SendKey(KeyBoard.Enter); // return; // //if (model.MembershipNoInXml.StartsWith("2") && scheme_Name.StartsWith("HSBC")) // //{ // // //base.SetText("Y", model.rowIndex, selCol); // // //SendKey(KeyBoard.Enter); // // //return; // // //if (model.Sts == "CU" || model.Sts == "NO") // // //{ // // base.SetText("Y", model.rowIndex, selCol); // // SendKey(KeyBoard.Enter); // // return; // // //} // // //else // // //{ // // // Message.Add("HSBC Member a/c status is " + model.Sts + " ,pls manual checking"); // // // checked_MembershipNo(entityList); // // // return; // // //} // //} // //else if (model.MembershipNoInXml.StartsWith("3") && scheme_Name.StartsWith("HANG")) // //{ // // //base.SetText("Y", model.rowIndex, selCol); // // //SendKey(KeyBoard.Enter); // // ////base.Enter(model.rowIndex, selCol); // // ////return; // // //if (model.Sts == "CU" || model.Sts == "NO") // // //{ // // base.SetText("Y", model.rowIndex, selCol); // // SendKey(KeyBoard.Enter); // // // return; // // //} // // //else // // //{ // // // Message.Add("HANG Member a/c status is " + model.Sts + " ,pls manual checking"); // // // checked_MembershipNo(entityList); // // // return; // // //} // //} // //else // //{ // // Message.Add("Member input info in the column which is different company, pls manual checking"); // // checked_MembershipNo(entityList); // // return; // //} ////} public bool SelectCase(SH795AccoutModel model, int selCol = 3, int stsCol = 66) { is_findcase = false;; for (int i = 1; i < model.pageIndex; i++) { base.PageDown(); } base.SetText("Y", model.rowIndex, selCol); SendKey(KeyBoard.Enter); is_findcase = true; return(is_findcase); }
public List <SH795AccoutModel> GetAccountList(List <SH795AccoutModel> list, int pageIndex) { //List<SH795AccoutModel> list = new List<SH795AccoutModel>(); Regex reg = new Regex(@"\s{2,}"); if (base.IsHaveNext()) { List <string> msgList = base.ReadRows(9, 22); int row = 9; foreach (string msg in msgList) { //var strList = reg.Split(msg.Trim()); //if(strList.Count()<6) //{ // continue; //} if (string.IsNullOrEmpty(msg.Substring(5, 10).Trim())) { continue; } SH795AccoutModel model = new SH795AccoutModel { pageIndex = pageIndex, rowIndex = row, //SchemeID = strList[0], //EmployerName = strList[1], //PayCID = strList[2], //Client = strList[3].Split(' ')[0], //Sts = strList[3].Split(' ')[1], //DJS = Convert.ToDateTime(strList[5]) SchemeID = msg.Substring(5, 10).Trim(), EmployerName = msg.Substring(15, 31).Trim(), PayCID = msg.Substring(46, 10).Trim(), Client = msg.Substring(56, 9).Trim(), Sts = msg.Substring(65, 4).Trim(), DJS = Convert.ToDateTime(msg.Substring(69).Trim()) }; list.Add(model); row++; } base.PageDown(); pageIndex++; GetAccountList(list, pageIndex); } else { List <string> msgList = base.ReadRows(9, 22); int row = 9; foreach (string msg in msgList) { //var strList = reg.Split(msg.Trim()); //if (strList.Count() < 6) //{ // continue; //} if (string.IsNullOrEmpty(msg.Substring(5, 10).Trim())) { continue; } SH795AccoutModel model = new SH795AccoutModel { pageIndex = pageIndex, rowIndex = row, SchemeID = msg.Substring(5, 10).Trim(), EmployerName = msg.Substring(15, 31).Trim(), PayCID = msg.Substring(46, 10).Trim(), Client = msg.Substring(56, 9).Trim(), Sts = msg.Substring(65, 4).Trim(), DJS = Convert.ToDateTime(msg.Substring(69).Trim()) }; list.Add(model); row++; } } return(list); }