private QueIndex GetQueIndex(CachLayQue cachLayQue, AmLich amLich) { var queIndex = new QueIndex(); switch (cachLayQue) { case CachLayQue.None: break; case CachLayQue.MaiHoaTienThien1: queIndex = _layQueService.GetQueIndexByTime(amLich, txtSoHoacChu.Text); break; case CachLayQue.MaiHoaTienThien2: queIndex = _layQueService.GetQueIndexBySoAndTime(amLich, txtQueNgoai1.Text); break; case CachLayQue.MaiHoaTienThien3: queIndex = _layQueService.GetQueIndexBySoAndSo(txtQueNgoai2.Text, txtQueNoi2.Text, amLich, chkCongChiGio.Checked); break; default: break; } return(queIndex); }
private void UpdateGioChiButtonsText() { var listQueTrong1Ngay = _layQueService.GetAllQueIndexesForADay(AmLich, txtSoHoacChu.Text); for (int i = 0; i < _diaChiButtons.Count; i++) { _diaChiButtons[i].Text = GetButtonText(listQueTrong1Ngay[i]); } QueIndex queGioMui = listQueTrong1Ngay[7]; labelNgayDich.Text = $"Ngày {queGioMui.GetQueChu().NgoaiQuai.Tuong}, giờ Mùi động hào {queGioMui.HaoDongNumber}"; }
private void SetNoiQuaiNgoaiQuai(AmLich amLich) { QueIndex queIndex = GetQueIndex(CachLayQue, amLich); txtDesc.Text = queIndex.Desc; ucQueDich.uiNgoaiQuai.SelectedIndex = queIndex.NgoaiQuaiIndex; ucQueDich.uiNoiQuai.SelectedIndex = queIndex.NoiQuaiIndex; ucQueDich.ResetHaoDong(); ucQueDich.uiIsHao1Dong.Checked = queIndex.HaoDongIndex == 1; ucQueDich.uiIsHao2Dong.Checked = queIndex.HaoDongIndex == 2; ucQueDich.uiIsHao3Dong.Checked = queIndex.HaoDongIndex == 3; ucQueDich.uiIsHao4Dong.Checked = queIndex.HaoDongIndex == 4; ucQueDich.uiIsHao5Dong.Checked = queIndex.HaoDongIndex == 5; ucQueDich.uiIsHao6Dong.Checked = queIndex.HaoDongIndex == 0; }
private string GetButtonText(QueIndex queIndex) { return($"{queIndex.GetQueChu().NameShort} → {queIndex.GetQueBien().NameShort}"); }