public JsonResult GetProExiById(string proexiId) { var pro = new ProExViewModel(); pro = _productProvider.GetProExiByProId(proexiId.Trim()); return(Json(pro, JsonRequestBehavior.AllowGet)); }
public ProExViewModel GetProExiByProId(string proexid) { var pro = new ProExViewModel(); pro = _productRespository.GetProExiByProId(proexid); return(pro); }
public async Task <List <ProExViewModel> > GetAllProExi(string empid) { var storeProcedureName = "[dbo].[Get_ProExi]"; var result = await _dbContext.Database.SqlQuery <ProExViewModel>( $"{storeProcedureName} @empid", new SqlParameter("@empid", empid) ).ToListAsync(); var list = new List <ProExViewModel>(); foreach (var i in result) { var ord = new ProExViewModel(); ord.ProExId = i.ProExId; ord.ProductName = i.ProductName; ord.ProductId = i.ProductId; ord.PaperName2 = i.PaperName2; ord.PaperName1 = i.PaperName1; ord.PaperId2Count = i.PaperId2Count; ord.PaperId1Count = i.PaperId1Count; ord.InkName2 = i.InkName2; ord.InkName1 = i.InkName1; ord.InkId2Count = i.InkId2Count; ord.InkId1Count = i.InkId1Count; list.Add(ord); } return(list); }