public JsonResult GetModel(int headId) { Book.BLL.T_Stock_In bll = new BLL.T_Stock_In(); List <Book.Model.T_Stock_InItems> list = bll.GetModel(headId); return(Json(list)); }
public JsonResult GetModel(int HeadId) { Book.BLL.T_Stock_In bll = new BLL.T_Stock_In(); //List<Book.Model.T_Stock_InItems> lst = new List<Book.Model.T_Stock_InItems>(); Book.Model.T_Stock_In stockIn = bll.GetModel(HeadId); // lst = stockIn.Items; // int count = bll.CountItem(HeadId); //return Json(new { total = count, rows = lst }); return(Json(stockIn)); }
public JsonResult GetModel2(int HeadId) { Book.BLL.T_Stock_In bll = new BLL.T_Stock_In(); Book.Model.T_Stock_In stockIn = bll.GetModel(HeadId); List <Book.Model.T_Stock_InItems> lst = stockIn.Items; List <Book.Model.EditItem> l = new List <Book.Model.EditItem>(); foreach (Book.Model.T_Stock_InItems it in lst) { Book.Model.EditItem ed = new Model.EditItem(); ed.Id = it.Id; ed.Amount = it.Amount; ed.BookId = it.BookId; ed.BookName = it.Book.BookName; ed.Discount = it.Discount; ed.Price = it.Book.Price; ed.SN = it.Book.SN; ed.PressName = it.Book.PressName; l.Add(ed); } return(Json(l)); }
public JsonResult GetModel(int HeadId) { Book.BLL.T_Stock_In bll = new BLL.T_Stock_In(); Book.Model.T_Stock_In stockIn = bll.GetModel(HeadId); return(Json(stockIn)); }