private void Process(object sender, EventArgs e) { try { if (listMessage.Count == 0) { isCurrentPayInProcessDone = true; timerCheckChildProcess.Stop(); return; } if (listMessage.ContainsKey(Constant.CAYBANG) && listMessage[Constant.CAYBANG].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is CBSite)) { iAutomationPayin = new CBSite(new List <Message>(listMessage[Constant.CAYBANG]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.CAYBANG); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.BANHKEO) && listMessage[Constant.BANHKEO].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is BKSite)) { iAutomationPayin = new BKSite(new List <Message>(listMessage[Constant.BANHKEO]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.BANHKEO); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.HANHLANG) && listMessage[Constant.HANHLANG].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is HLCSite)) { iAutomationPayin = new HLCSite(new List <Message>(listMessage[Constant.HANHLANG]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.HANHLANG); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.MH) && listMessage[Constant.MH].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is MHSite)) { iAutomationPayin = new MHSite(new List <Message>(listMessage[Constant.MH]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.MH); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.LANQUEPHUONG) && listMessage[Constant.LANQUEPHUONG].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is LQSite)) { iAutomationPayin = new LQSite(new List <Message>(listMessage[Constant.LANQUEPHUONG]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.LANQUEPHUONG); iAutomationPayin = null; showSearchMessage(); } } catch (Exception ex) { throw ex; } }
private void Process(object sender, EventArgs e) { try { if (listMessage.Count == 0) { isCurrentPayInProcessDone = true; timerCheckChildProcess.Stop(); return; } if (listMessage.ContainsKey(Constant.CAYBANG) && listMessage[Constant.CAYBANG].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is CBSite)) { iAutomationPayin = new CBSite(new List <Message>(listMessage[Constant.CAYBANG]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.CAYBANG); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.HANHLANG) && listMessage[Constant.HANHLANG].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is HLCSite)) { iAutomationPayin = new HLCSite(new List <Message>(listMessage[Constant.HANHLANG]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.HANHLANG); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.GIADINHVN) && listMessage[Constant.GIADINHVN].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is GDSite)) { iAutomationPayin = new GDSite(new List <Message>(listMessage[Constant.GIADINHVN]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.GIADINHVN); iAutomationPayin = null; showSearchMessage(); } else if (listMessage.ContainsKey(Constant.NT30s) && listMessage[Constant.NT30s].Count > 0) { if (iAutomationPayin == null || !(iAutomationPayin is NT30sSite)) { iAutomationPayin = new NT30sSite(new List <Message>(listMessage[Constant.NT30s]), webLayout); iAutomationPayin.startPayIN(); } if (!iAutomationPayin.checkProcessDone()) { return; } listMessage.Remove(Constant.NT30s); iAutomationPayin = null; showSearchMessage(); } } catch (Exception ex) { throw ex; } }