Esempio n. 1
0
 public HttpResponseMessage RemoveConfig(string pk)
 {
     try
     {
         HD_CONFIG_KEY param = hD_CONFIG_KEYBO.GetEntity(int.Parse(pk));
         param.IsDeleted = true;
         hD_CONFIG_KEYBO.UpdateSome(param);
         return(Request.CreateResponse(HttpStatusCode.OK, "删除成功"));
     }
     catch
     {
         return(Request.CreateErrorResponse(HttpStatusCode.OK, "删除失败"));
     }
 }
Esempio n. 2
0
        public HttpResponseMessage AddConfig(HD_CONFIG_KEY param)
        {
            param.CreatedTime = SSGlobalConfig.Now;
            param.IsDeleted   = false;//逻辑删除默认false,弱删除则为true
            HD_CONFIG_KEY entity = hD_CONFIG_KEYBO.Insert(param);

            if (entity != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "新增成功"));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "新增失败"));
            }
        }
Esempio n. 3
0
 public HttpResponseMessage EditConfig(HD_CONFIG_KEY param)
 {
     try
     {
         HD_CONFIG_KEY entity = hD_CONFIG_KEYBO.GetEntity((int)param.PK);
         entity.Last_update_date = SSGlobalConfig.Now;
         entity.Last_update_by   = param.Last_update_by;
         entity.HCode            = param.HCode;
         entity.HDescription     = param.HDescription;
         hD_CONFIG_KEYBO.UpdateSome(entity);
         return(Request.CreateResponse(HttpStatusCode.OK, "修改成功"));
     }
     catch {
         return(Request.CreateResponse(HttpStatusCode.OK, "修改失败"));
     }
 }