Exemplo n.º 1
0
        //Thêm ngoài Implement

        public Dictionary <int, List <string> > NhuTheoEpKimS()
        {
            var dict = new Dictionary <int, List <string> >();

            if (string.IsNullOrEmpty(View.TenThanhPhamChon))
            {
                return(dict);
            }
            //Qua tiếp


            foreach (NhuEpKim nhu in  NhuEpKim.DocTheoIdEpKim(View.IdThanhPhamChon))
            {
                var lst = new List <string>();
                lst.Add(nhu.Ten);
                lst.Add(nhu.DienGiai);
                lst.Add(string.Format("{0:0,0.00}đ/cm2", nhu.GiaMuaCm2));
                lst.Add(nhu.ThuTu.ToString());
                dict.Add(nhu.ID, lst);
            }
            return(dict);
        }
        public Dictionary <int, List <string> > NhuTheoEpKimS()
        {
            var dict = new Dictionary <int, List <string> >();

            if (string.IsNullOrEmpty(View.TenThPhChon))
            {
                return(dict);
            }
            //Qua tiếp

            var idEpKim = this.ThanhPhamS().FirstOrDefault(x => x.Value == View.TenThPhChon).Key;

            foreach (NhuEpKim nhu in  NhuEpKim.DocTheoIdEpKim(idEpKim))
            {
                var lst = new List <string>();
                lst.Add(nhu.Ten);
                lst.Add(nhu.DienGiai);
                lst.Add(string.Format("{0:0,0.00}đ/cm2", nhu.GiaMuaCm2));
                lst.Add(nhu.ThuTu.ToString());
                dict.Add(nhu.ID, lst);
            }
            return(dict);
        }
 public List <NhuEpKim> NhuEpKimSTheoEpKim()
 {
     return(NhuEpKim.DocTheoIdEpKim(View.IdEpKim));
 }