public BasketItemsInfo QueryGiftInfo(int productSysNo) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("QueryGiftInfo"); command.CommandText = command.CommandText.Replace("@ProductSysNo", productSysNo.ToString()); return(command.ExecuteEntity <BasketItemsInfo>()); }
/// <summary> /// 根据编号获取帮助中心新闻 /// </summary> /// <param name="sysNo">新闻编号</param> /// <returns>帮助中心新闻</returns> public static NewsInfo GetTopHelperCenterBySysNo(int sysNo) { CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("Content_GetTopHelperCenterBySysNo"); cmd.SetParameterValue("@SysNo", sysNo); return(cmd.ExecuteEntity <NewsInfo>()); }
public static PurchaseOrderInfo LoadPOMaster(int poSysNo) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetPOMasterBySysNo"); command.SetParameterValue("@SysNo", poSysNo); return(command.ExecuteEntity <PurchaseOrderInfo>()); }
public BizEntity.PO.Vendor.CommissionRuleTemplateInfo GetCommissionRuleTemplateInfo(int sysno) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetCommissionRuleTemplateInfo"); command.SetParameterValue("@SysNo", sysno); return(command.ExecuteEntity <CommissionRuleTemplateInfo>()); }
public BizObjectLanguageDesc GetBizObjectLanguageInfo(string bizObjectType, string languageCode, int?bizObjectSysNo, string bizObjectId) { BizObjectLanguageDesc result = null; CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("GetBizObjectLanguageInfo"); using (var sb = new DynamicQuerySqlBuilder(cmd.CommandText, cmd, new PagingInfoEntity(), "ORDER BY SysNo")) { if (!string.IsNullOrEmpty(bizObjectType)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "BizObjectType", DbType.String, "@BizObjectType", QueryConditionOperatorType.Equal, bizObjectType); } if (!string.IsNullOrEmpty(languageCode)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "LanguageCode", DbType.String, "@LanguageCode", QueryConditionOperatorType.Equal, languageCode); } if (bizObjectSysNo.HasValue) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "BizObjectSysNo", DbType.Int32, "@BizObjectSysNo", QueryConditionOperatorType.Equal, bizObjectSysNo); } if (!string.IsNullOrEmpty(bizObjectId)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "bizObjectId", DbType.String, "@bizObjectId", QueryConditionOperatorType.Equal, bizObjectId); } cmd.CommandText = sb.BuildQuerySql(); result = cmd.ExecuteEntity <BizObjectLanguageDesc>(); } return(result); }
public RefundAdjustInfo GetCustomerIDBySOSysNo(RefundAdjustInfo entity) { CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("Customer_Get_CustomerIDBySoSysNo"); cmd.SetParameterValue("@SOSysNo", entity.SOSysNo); cmd.SetParameterValue("@CompanyCode", entity.CompanyCode); return(cmd.ExecuteEntity <RefundAdjustInfo>()); }
public CommissionItem QueryVendorManufacturerBySysNo(int vendorManufacturerSysNo) { CustomDataCommand dataCommand = DataCommandManager.CreateCustomDataCommandFromConfig("QueryVendorManufacturerBySysNo"); dataCommand.AddInputParameter("@SysNo", DbType.Int32, vendorManufacturerSysNo); return(dataCommand.ExecuteEntity <CommissionItem>()); }
public static PurchaseOrderETATimeInfo LoadPOETATimeInfo(int poSysNo) { CustomDataCommand dataCommand = DataCommandManager.CreateCustomDataCommandFromConfig("GetPOETA"); dataCommand.SetParameterValue("@POSysNo", poSysNo); PurchaseOrderETATimeInfo poETA = dataCommand.ExecuteEntity <PurchaseOrderETATimeInfo>(); return(poETA); }
public ProductShiftDetailEntity GetProductShiftDetail(int shiftSysno, int productSysno) { CustomDataCommand dataCommand = DataCommandManager.CreateCustomDataCommandFromConfig("GetProductShiftDetails"); using (DynamicQuerySqlBuilder sqlBuilder = new DynamicQuerySqlBuilder( dataCommand.CommandText, dataCommand, null, "st.SysNo desc")) { sqlBuilder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "st.SysNo", DbType.Int32, "@ShiftSysno", QueryConditionOperatorType.Equal, shiftSysno); sqlBuilder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "stItem.ProductSysNo", DbType.Int32, "@ProdcutSysno", QueryConditionOperatorType.Equal, productSysno); dataCommand.CommandText = sqlBuilder.BuildQuerySql(); } return(dataCommand.ExecuteEntity <ProductShiftDetailEntity>()); }
public CollectionPaymentInfo Load(int vendorSettleSysNo) { CollectionPaymentInfo settle = new CollectionPaymentInfo(); CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetCollVendorSettleBySysNo"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder(command.CommandText, command, null, "Settle.SysNo DESC")) { HasPMRight(builder); builder.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "Settle.SysNo", DbType.Int32, "@SettleSysNo", QueryConditionOperatorType.Equal, vendorSettleSysNo); ProviderHelper.SetCommonParams(builder, "Settle"); command.CommandText = builder.BuildQuerySql(); } settle = command.ExecuteEntity <CollectionPaymentInfo>(); if (settle != null) { DataCommand commandItem = DataCommandManager.GetDataCommand("GetCollVendorSettleItemsBySysNo"); commandItem.SetParameterValue("@SettleSysNo", vendorSettleSysNo); ProviderHelper.SetCommonParams(commandItem); settle.SettleItems = commandItem.ExecuteEntityList <CollectionPaymentItem>(); settle.SettleItems.ForEach(x => { x.ConsignToAccLogInfo.RateMargin = x.ConsignToAccLogInfo.SalePrice - x.ConsignToAccLogInfo.Cost; x.ConsignToAccLogInfo.CountMany = x.ConsignToAccLogInfo.ProductQuantity * x.ConsignToAccLogInfo.Cost; x.ConsignToAccLogInfo.RateMarginTotal = x.ConsignToAccLogInfo.RateMargin * x.ConsignToAccLogInfo.ProductQuantity; x.ConsignToAccLogInfo.LogSysNo = x.POConsignToAccLogSysNo; x.Cost = x.ConsignToAccLogInfo.Cost.Value; }); } return(settle); }
/// <summary> /// 根据电汇邮局收款单系统编号加载收款单信息 /// </summary> /// <param name="postIncomeSysNo"></param> /// <returns></returns> public PostIncomeInfo LoadBySysNo(int postIncomeSysNo) { CustomDataCommand dataCommand = DataCommandManager.CreateCustomDataCommandFromConfig("GetPostIncomeList"); using (DynamicQuerySqlBuilder sqlBuilder = new DynamicQuerySqlBuilder( dataCommand.CommandText, dataCommand, null, "SysNo desc")) { sqlBuilder.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "SysNo", DbType.Int32, "@SysNo", QueryConditionOperatorType.Equal, postIncomeSysNo); dataCommand.CommandText = sqlBuilder.BuildQuerySql(); var postIncomeInfo = dataCommand.ExecuteEntity <PostIncomeInfo>(); if (postIncomeInfo != null) { postIncomeInfo.ConfirmInfoList = GetConfirmListByPostIncomeSysNo(postIncomeInfo.SysNo.Value); } return(postIncomeInfo); } }
public GatherSettlementInfo LoadGatherSettlement(GatherSettlementInfo info) { GatherSettlementInfo settle = new GatherSettlementInfo(); CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetVendorSettleGatherBySysNo"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder(command.CommandText, command, null, "Settle.SysNo DESC")) { builder.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "Settle.SysNo", DbType.Int32, "@SettleSysNo", QueryConditionOperatorType.Equal, info.SysNo); command.CommandText = builder.BuildQuerySql(); } settle = command.ExecuteEntity <GatherSettlementInfo>(); return(settle); }
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); }
/// <summary> /// 检查手机号码唯一性 /// </summary> /// <param name="entity"></param> /// <returns></returns> public virtual CustomerBasicInfo CheckSameCellPhone(CustomerBasicInfo entity, string companyCode) { CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("CheckSameCellPhone"); using (DynamicQuerySqlBuilder sb = new DynamicQuerySqlBuilder(cmd, "C.[SysNo]")) { if (entity.CustomerSysNo != null) { sb.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "C.[SysNo]", DbType.Int32, "@SysNo", QueryConditionOperatorType.NotEqual, entity.CustomerSysNo); } if (!string.IsNullOrEmpty(entity.CellPhone)) { sb.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "C.CellPhone", DbType.String, "@CellPhone", QueryConditionOperatorType.Equal, entity.CellPhone); } sb.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "CompanyCode", DbType.AnsiStringFixedLength, "@CompanyCode", QueryConditionOperatorType.Equal, companyCode); cmd.CommandText = sb.BuildQuerySql(); } return(cmd.ExecuteEntity <CustomerBasicInfo>()); }
public BizEntity.PO.ConsignSettlementInfo LoadConsignSettlementInfo(int consignSettlementSysNo) { ConsignSettlementInfo returnEntity = new ConsignSettlementInfo(); CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("GetVendorSettleBySysNo"); using (DynamicQuerySqlBuilder builder = new DynamicQuerySqlBuilder(command.CommandText, command, null, "Settle.SysNo DESC")) { //TODO: PM权限处理: //HasPMRight(builder); builder.ConditionConstructor.AddCondition( QueryConditionRelationType.AND, "Settle.SysNo", DbType.Int32, "@SettleSysNo", QueryConditionOperatorType.Equal, consignSettlementSysNo); command.CommandText = builder.BuildQuerySql(); } returnEntity = command.ExecuteEntity <ConsignSettlementInfo>(); return(returnEntity); }