public List <Prod_BH_List_PO_Result> ListPO(int page, TongHopDonPO TongHopDonPO) { var query = db.Database.SqlQuery <Prod_BH_List_PO_Result>("Prod_BH_List_PO @macongty,@username,@isadmin,@sotrang,@tukhoa", new SqlParameter("macongty", "HOPLONG"), new SqlParameter("username", TongHopDonPO.username), new SqlParameter("isadmin", TongHopDonPO.isadmin), new SqlParameter("sotrang", page), new SqlParameter("tukhoa", TongHopDonPO.tukhoa)); var result = query.ToList(); return(result); }
public string DemTongSoDonPO(TongHopDonPO TongHopDonPO) { var query = db.Database.SqlQuery <int>("Prod_BH_DemTongSoDonPO @username,@macongty,@isadmin", new SqlParameter("username", TongHopDonPO.username), new SqlParameter("macongty", TongHopDonPO.macongty), new SqlParameter("isadmin", TongHopDonPO.isadmin)); var result = query.FirstOrDefault(); string kq = result.ToString(); return(kq); }