private void KimDu() { var canNgay = this.TTM.LaSoCuaToi.TuTru[Constants.TRU_NGAY].ThienCan.Can; DiaChi dc = null; switch (canNgay) { case CanEnum.None: break; case CanEnum.Giap: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Thin); break; case CanEnum.At: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Ty); break; case CanEnum.Binh: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Mui); break; case CanEnum.Dinh: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Than); break; case CanEnum.Mau: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Mui); break; case CanEnum.Ky: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Than); break; case CanEnum.Canh: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Tuat); break; case CanEnum.Tan: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Hoi); break; case CanEnum.Nham: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Suu); break; case CanEnum.Quy: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Dan); break; default: break; } if (dc != null) { dc.AddThanSat(Constants.ThanSat.KIM_DU); } }
private void ThienY() { var chiThang = this.TTM.LaSoCuaToi.TuTru[Constants.TRU_THANG].DiaChi.Ten; DiaChi dc = null; switch (chiThang) { case ChiEnum.None: break; case ChiEnum.Ti: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Hoi); break; case ChiEnum.Suu: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Ti); break; case ChiEnum.Dan: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Suu); break; case ChiEnum.Mao: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Dan); break; case ChiEnum.Thin: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Mao); break; case ChiEnum.Ty: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Thin); break; case ChiEnum.Ngo: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Ty); break; case ChiEnum.Mui: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Ngo); break; case ChiEnum.Than: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Mui); break; case ChiEnum.Dau: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Than); break; case ChiEnum.Tuat: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Dau); break; case ChiEnum.Hoi: dc = TongHopCanChi.MuoiHaiDiaChi.Find(u => u.Ten == ChiEnum.Tuat); break; default: break; } if (dc != null) { dc.AddThanSat(Constants.ThanSat.THIEN_Y); } }