Esempio n. 1
0
        public List <Prod_BH_ListBaoGia_Result> ListBaoGia(int page, TongHopBaoGia TongHopBaoGia)
        {
            var query  = db.Database.SqlQuery <Prod_BH_ListBaoGia_Result>("Prod_BH_ListBaoGia @username,@macongty,@isadmin,@sotrang,@tukhoa", new SqlParameter("username", TongHopBaoGia.username), new SqlParameter("macongty", TongHopBaoGia.macongty), new SqlParameter("isadmin", TongHopBaoGia.isadmin), new SqlParameter("sotrang", page), new SqlParameter("tukhoa", TongHopBaoGia.tukhoa));
            var result = query.ToList();

            return(result);
        }
Esempio n. 2
0
        public string DemTongSoBaoGia(TongHopBaoGia TongHopBaoGia)
        {
            var    query  = db.Database.SqlQuery <int>("Prod_BH_DemTongSoBaoGia @username,@macongty,@isadmin", new SqlParameter("username", TongHopBaoGia.username), new SqlParameter("macongty", TongHopBaoGia.macongty), new SqlParameter("isadmin", TongHopBaoGia.isadmin));
            var    result = query.FirstOrDefault();
            string kq     = result.ToString();

            return(kq);
        }