Esempio n. 1
0
        public HttpResponseMessage AddConfig(HD_CONFIG_KEY_RELATION param)
        {
            param.CreatedTime = SSGlobalConfig.Now;
            HD_CONFIG_KEY_RELATION entity = hD_CONFIG_KEY_RELATIONBO.Insert(param);

            if (entity != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "新增成功"));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "新增失败"));
            }
        }
Esempio n. 2
0
 public HttpResponseMessage RemoveRelation(string pk)
 {
     try
     {
         HD_CONFIG_KEY_RELATION entity = new HD_CONFIG_KEY_RELATION()
         {
             PK = int.Parse(pk)
         };
         hD_CONFIG_KEY_RELATIONBO.Delete(entity);
         return(Request.CreateResponse(HttpStatusCode.OK, "删除成功"));
     }
     catch
     {
         return(Request.CreateErrorResponse(HttpStatusCode.OK, "删除失败"));
     }
 }
Esempio n. 3
0
 public HttpResponseMessage EditConfig(HD_CONFIG_KEY_RELATION param)
 {
     try
     {
         HD_CONFIG_KEY_RELATION entity = hD_CONFIG_KEY_RELATIONBO.GetEntity((int)param.PK);
         entity.Last_update_date = SSGlobalConfig.Now;
         entity.Last_update_by   = param.Last_update_by;
         entity.RCode            = param.RCode;
         entity.RDecription      = param.RDecription;
         entity.ExtraMessage     = param.ExtraMessage;
         entity.ExtraDecription  = param.ExtraDecription;
         hD_CONFIG_KEY_RELATIONBO.UpdateSome(entity);
         return(Request.CreateResponse(HttpStatusCode.OK, "修改成功"));
     }
     catch
     {
         return(Request.CreateResponse(HttpStatusCode.OK, "修改失败"));
     }
 }
Esempio n. 4
0
 private void setFaultConfig(DM_Device_MaintenanceOrder dd)
 {
     //添加解决选项方法配置
     if (!string.IsNullOrEmpty(dd.Remark.Trim()))
     {
         HD_CONFIG_KEY_QueryParam param = new HD_CONFIG_KEY_QueryParam
         {
             HCode = "methodCode"//处理方法及代码的快码
         };
         IList <HD_CONFIG_KEY> list = hD_CONFIG_KEY.GetEntitiesByParam(param);
         if (list != null && list.Count != 0)
         {
             HD_CONFIG_KEY_RELATION Enity = new HD_CONFIG_KEY_RELATION
             {
                 KeyPK        = (int)list[0].PK,
                 RDecription  = dd.Remark,
                 ExtraMessage = dd.FaultPhenomenon
             };
             hD_CONFIG_KEY_RELATIONBO.Insert(Enity);
         }
     }
 }