Пример #1
0
        public JsonResult GetListNoAction(GridPager pager, string querystr, string vercode)
        {
            List <DEF_TestJobsDetailItemModel> list = Item_BLL.GetList(ref pager, querystr, vercode);
            var json = new
            {
                total = pager.totalRows,
                rows  = (from r in list
                         select new DEF_TestJobsDetailItemModel()
                {
                    Id = r.VerCode + "_" + r.Code,
                    VerCode = r.VerCode,
                    Code = r.Code,
                    Name = r.Name,
                    Description = r.Description,
                    Result = r.Result,
                    Sort = r.Sort,
                    ExSort = r.ExSort,
                    Lock = r.Lock,
                    Developer = r.Developer,
                    Tester = r.Tester,
                    FinDt = r.FinDt,
                    TestRequestFlag = r.TestRequestFlag,
                    DevFinFlag = r.DevFinFlag
                }).ToArray()
            };

            return(Json(json));
        }
Пример #2
0
 public ActionResult RunDev(DEF_TestJobsDetailStepsModel model)
 {
     try
     {
         model.Developer = GetUserId();
         if (m_BLL.RunDev(ref validationErrors, model))
         {
             //生成缺陷报告
             Item_BLL.DevUpdateState(ref validationErrors, model.VerCode, model.Code);
         }
         //写日志
         if (validationErrors.Count > 0)
         {
             //错误写入日志
             LogHandler.WriteServiceLog(GetUserId(), Resource.UpdateFail + ",开发步骤ID:" + model.ItemID, "失败", "新增", "测试步骤");
             return(Json(JsonHandler.CreateMessage(0, validationErrors.Error)));
         }
         //成功写入日志
         LogHandler.WriteServiceLog(GetUserId(), Resource.UpdateFail + ",开发步骤ID:" + model.ItemID, "成功", "新增", "测试步骤");
         return(Json(JsonHandler.CreateMessage(1, Resource.UpdateSucceed)));
     }
     catch
     {
         return(Json(JsonHandler.CreateMessage(0, Resource.UpdateFail)));
     }
 }