/// <summary> /// 加载成本变价单详细 /// </summary> /// <param name="settlementSysNo"></param> /// <returns></returns> public virtual CostChangeInfo LoadCostChangeInfo(int ccSysNo) { CostChangeInfo returnEntity = new CostChangeInfo(); CostChangeBasicInfo baseInfo = CostChangeDA.LoadCostChangeBasicInfo(ccSysNo); if (null != baseInfo && baseInfo.SysNo > 0) { returnEntity.SysNo = ccSysNo; returnEntity.CostChangeBasicInfo = baseInfo; returnEntity.CostChangeItems = CostChangeDA.LoadCostChangeItemList(baseInfo.SysNo); } return(returnEntity); }
public CostChangeBasicInfo LoadCostChangeBasicInfo(int ccSysNo) { CostChangeBasicInfo returnEntity = new CostChangeBasicInfo(); CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetCostChangeBySysNo"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder(command.CommandText, command, null, "CC.SysNo DESC")) { builder.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "CC.SysNo", DbType.Int32, "@CostChangeSysNo", QueryConditionOperatorType.Equal, ccSysNo); command.CommandText = builder.BuildQuerySql(); returnEntity = command.ExecuteEntity <CostChangeBasicInfo>(); } return(returnEntity); }