예제 #1
0
 public object AddInterfaceConfigInfo(string interfaceName, string user, string pwd, string charger, string phone, int timeout, string docPath, string desc, string urlAddress, string exeptionlevel, string affectProduction, string type, string appid, string destAppid)
 {
     try
     {
         if (null == InterfaceConfigInfoOperation.GetInterfaceConfigInfo(interfaceName, new Guid(appid)))
         {
             InterfaceConfigInitBizProcess.SaveInterfaceInitial(interfaceName, user, pwd, charger, phone, timeout, docPath, desc, urlAddress, exeptionlevel, affectProduction, type, appid, destAppid);
             return(string.Format("添加【{0}】配置信息成功!", interfaceName));
         }
         else
         {
             return(string.Format("{0},{1},{2}该接口配置已存在!", interfaceName, appid));
         }
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
예제 #2
0
 public object DeleteInterfaceConfigInfo(string id)
 {
     try
     {
         InterfaceConfigInfo info = InterfaceConfigInfoOperation.GetInterfaceConfigInfoById(new Guid(id));
         if (info != null)
         {
             InterfaceConfigInitBizProcess.DeleteInterfaceConfigInfoById(id);
             return(string.Format("删除【{0}】成功!", info.InterfaceName));
         }
         else
         {
             return(string.Format("系统不存在【{0}】配置信息!", info.InterfaceName));
         }
     }
     catch (Exception ex)
     {
         return("删除失败!");
     }
 }
예제 #3
0
 public object UpdateInterfaceConfigInfo(string id, string interfaceName, string user, string pwd, string charger, string phone, int timeout, string docPath, string desc, string urlAddress, string exeptionlevel, string affectProduction, string type, string appid, string destapp)
 {
     try
     {
         ApplicationSysInfo appinfo = ApplicationSysInfoLogical.GetApplicationSysInfoById(new Guid(appid));
         if (null != InterfaceConfigInfoOperation.GetInterfaceConfigInfo(interfaceName, appinfo.name, appinfo.server))
         {
             InterfaceConfigInitBizProcess.UpdateInterfaceConfigInfo(id, interfaceName, user, pwd, charger, phone, timeout, docPath, desc, urlAddress, exeptionlevel, affectProduction, type, appid, destapp);
             return(string.Format("更新【{0}】配置信息成功!", interfaceName));
         }
         else
         {
             return(string.Format("不存在【{0}】配置信息!", interfaceName));
         }
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }