示例#1
0
 public List <ImportDetailDTO> GetListDetailDTOs(int id)
 {
     using (ImportDAO db = new ImportDAO(_context))
     {
         var re = db.Get(id);
         return(LsObjectMapperTo <ImportDetail, ImportDetailDTO>(re.ImportDetails));
     }
 }
示例#2
0
        public JsonResult Get(long id)
        {
            try
            {
                Import data = dao.Get(id);

                return(Json(new
                {
                    data = data
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new
                {
                    data = DBNull.Value.ToString()
                }, JsonRequestBehavior.AllowGet));
            }
        }