/// <summary> /// 更新一个接口参数 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool UpdateSingleInterfaceParameterModel(InterfaceParameterModel model) { try { string SQLString = @"SQL\DocumentInterface\UpdateSingleInterfaceParameter.sql".ToFileContent( model.ParameterID, model.ParameterType, model.ParameterCode, model.ParameterName, model.DataType, model.CheckContent, model.Remark, model.OrderIndex); MSSQLDataBaseServer SQLHelper = new MSSQLDataBaseServer("DocumentManageDB"); int Result = SQLHelper.ExecuteNonQuery(SQLString); if (Result == 1) { return(true); } else { return(false); } } catch { throw; } }
/// <summary> /// 新增一个接口参数 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool InsertSingleInterfaceParameterModel(InterfaceParameterModel model) { try { string Value = string.Format("{0},{1},{2},0,{3},GETDATE(),GETDATE(),'{4}',N'{5}','{6}',N'{7}',N'{8}'", model.ProgramID, model.InterfaceID, model.ParameterType, model.OrderIndex, model.ParameterCode, model.ParameterName, model.DataType, model.CheckContent, model.Remark); string SQLString = @"SQL\DocumentInterface\InsertSingleInterfaceParameter.sql".ToFileContent(Value); MSSQLDataBaseServer SQLHelper = new MSSQLDataBaseServer("DocumentManageDB"); int Result = SQLHelper.ExecuteNonQuery(SQLString); if (Result == 1) { return(true); } else { return(false); } } catch { throw; } }
/// <summary> /// 根据参数编号ID获取接口参数对象 /// </summary> /// <param name="parameterID"></param> /// <returns></returns> public InterfaceParameterModel SelectInterfaceParameterModel(int parameterID) { try { string SQLString = @"SQL\DocumentInterface\SelectDocumentInterfaceParameter.sql".ToFileContent(parameterID); MSSQLDataBaseServer SQLHelper = new MSSQLDataBaseServer("DocumentManageDB"); DataSet DataTableSet = SQLHelper.ExecuteDataset(SQLString); if (DataTableSet == null || DataTableSet.Tables.Count < 1) { return(null); } InterfaceParameterModel Model = new InterfaceParameterModel(); List <InterfaceParameterModel> List = DataTableSet.Tables[0].ToList <InterfaceParameterModel>(); if (List == null || List.Count != 1) { return(null); } else { Model = List[0]; } return(Model); } catch { throw; } }
public bool UpdateInterfaceParameter(InterfaceParameterModel model) { bool Result = false; try { Result = new DocumentInterfaceDAL().UpdateSingleInterfaceParameterModel(model); } catch (Exception e) { logger.Error(e.ToString()); } return(Result); }
public bool DeleteInterfaceParameter(int parameterID) { bool Result = false; try { InterfaceParameterModel model = new InterfaceParameterModel() { ParameterID = parameterID }; Result = new DocumentInterfaceDAL().DeleteSingleInterfaceParameterModel(model); } catch (Exception e) { logger.Error(e.ToString()); } return(Result); }
/// <summary> /// 删除一个接口参数 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool DeleteSingleInterfaceParameterModel(InterfaceParameterModel model) { try { string SQLString = @"SQL\DocumentInterface\DeleteSingleInterfaceParameter.sql".ToFileContent(model.ParameterID); MSSQLDataBaseServer SQLHelper = new MSSQLDataBaseServer("DocumentManageDB"); int Result = SQLHelper.ExecuteNonQuery(SQLString); if (Result == 1) { return(true); } else { return(false); } } catch { throw; } }
public bool UpdateDocumentInterfaceParamter(InterfaceParameterModel model) { return(new DocumentInterfaceBLL().UpdateInterfaceParameter(model)); }
public bool InsertDocumentInterfaceParamter(InterfaceParameterModel model) { return(new DocumentInterfaceBLL().InsertInterfaceParameter(model)); }