当前位置: 首页>>代码示例>>C#>>正文


C# PXCache类代码示例

本文整理汇总了C#中PXCache的典型用法代码示例。如果您正苦于以下问题:C# PXCache类的具体用法?C# PXCache怎么用?C# PXCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PXCache类属于命名空间,在下文中一共展示了PXCache类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FieldVerifying

		public override void FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)
		{
			if (object.Equals(DRScheduleDetail.EmptyComponentID, e.NewValue))
				return;

			base.FieldVerifying(sender, e);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:7,代码来源:Attribute.cs

示例2: Page_ColumnSet_RowSelected

	void Page_ColumnSet_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
	{
        var gridHeader = sp1.FindControl("gridHeader") as PXGrid;
        var gridColumn = sp1.FindControl("gridColumn") as PXGrid;
        
        CreateColumns(ds.GetSchema("Headers"), gridHeader);
		CreateColumns(ds.GetSchema("Properties"), gridColumn);
	}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:8,代码来源:CS206020.aspx.cs

示例3: SetDefaultEffDate

		private void SetDefaultEffDate(PXCache cache)
		{
			object newValue;
			if (cache.RaiseFieldDefaulting<CurrencyInfo.curyEffDate>(this, out newValue))
			{
				cache.RaiseFieldUpdating<CurrencyInfo.curyEffDate>(this, ref newValue);
			}
			this.CuryEffDate = (DateTime?)newValue;
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:CurrencyInfo.cs

示例4: getCuryRate

		private CurrencyRate getCuryRate(PXCache cache)
		{
			return PXSelectReadonly<CurrencyRate,
							Where<CurrencyRate.toCuryID, Equal<Required<CurrencyInfo.baseCuryID>>,
							And<CurrencyRate.fromCuryID, Equal<Required<CurrencyInfo.curyID>>,
							And<CurrencyRate.curyRateType, Equal<Required<CurrencyInfo.curyRateTypeID>>,
							And<CurrencyRate.curyEffDate, LessEqual<Required<CurrencyInfo.curyEffDate>>>>>>,
							OrderBy<Desc<CurrencyRate.curyEffDate>>>.SelectWindowed(cache.Graph, 0, 1, BaseCuryID, CuryID, CuryRateTypeID, CuryEffDate);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:CurrencyInfo.cs

示例5: getCMSetup

		private CMSetup getCMSetup(PXCache cache)
		{
			CMSetup CMSetup = (CMSetup)cache.Graph.Caches[typeof(CMSetup)].Current;
			if (CMSetup == null)
			{
				CMSetup = PXSelectReadonly<CMSetup>.Select(cache.Graph);
			}
			return CMSetup;
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:CurrencyInfo.cs

示例6: SubstituteKeyFieldUpdating

		public override void SubstituteKeyFieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e)
		{
			if (object.Equals(EmptyComponentCD, e.NewValue))
			{
				e.NewValue = DRScheduleDetail.EmptyComponentID;
			}
			else
				base.SubstituteKeyFieldUpdating(sender, e);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:Attribute.cs

示例7: Users_RowSelected

		protected void Users_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
		{
			Users user = (Users)e.Row;
			if (user == null) return;

			bool isNotFromAD = user.Source != PXUsersSourceListAttribute.ActiveDirectory;
			PXDefaultAttribute.SetPersistingCheck<Users.password>(sender, user, isNotFromAD ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
			PXDefaultAttribute.SetPersistingCheck<Users.email>(sender, user, isNotFromAD ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:MyProfileMaint.cs

示例8: defaultCuryRate

		private void defaultCuryRate(PXCache cache, bool ForceDefault)
		{
			CurrencyRate rate = getCuryRate(cache);
			if (rate != null)
			{
				DateTime? UserCuryEffDate = CuryEffDate;

				CuryEffDate = rate.CuryEffDate;
				CuryRate = Math.Round((decimal)rate.CuryRate, 8);
				CuryMultDiv = rate.CuryMultDiv;
				RecipRate = Math.Round((decimal)rate.RateReciprocal, 8);

				if (rate.CuryEffDate < UserCuryEffDate)
				{
					CurrencyRateType ratetype = (CurrencyRateType)PXSelectorAttribute.Select<CurrencyInfo.curyRateTypeID>(cache, this);
					if (ratetype != null && ratetype.RateEffDays > 0 && ((TimeSpan)(UserCuryEffDate - rate.CuryEffDate)).Days > ratetype.RateEffDays)
					{
						throw new PXRateIsNotDefinedForThisDateException(rate.CuryRateType, rate.FromCuryID, rate.ToCuryID, (DateTime)UserCuryEffDate);
					}
				}
			}
			else if (ForceDefault)
			{
				if (object.Equals(this._CuryID, this._BaseCuryID))
				{
					bool dirty = cache.IsDirty;
					CurrencyInfo dflt = new CurrencyInfo();
					cache.SetDefaultExt<CurrencyInfo.curyRate>(dflt);
					cache.SetDefaultExt<CurrencyInfo.curyMultDiv>(dflt);
					cache.SetDefaultExt<CurrencyInfo.recipRate>(dflt);
					CuryRate = Math.Round((decimal)dflt.CuryRate, 8);
					CuryMultDiv = dflt.CuryMultDiv;
					RecipRate = Math.Round((decimal)dflt.RecipRate, 8);
					cache.IsDirty = dirty;
				}
				else if (this._CuryRateTypeID == null || this._CuryEffDate == null)
				{
					this.CuryRate = null;
					this.RecipRate = null;
					this.CuryMultDiv = "M"; 
				}
				else
				{
					this.CuryRate = null;
					this.RecipRate = null;
					this.CuryMultDiv = "M";
					throw new PXSetPropertyException(Messages.RateNotFound, PXErrorLevel.Warning);
				}
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:50,代码来源:CurrencyInfo.cs

示例9: PrepareInsert

		protected override bool PrepareInsert(PXCache sender, object row, PXAccumulatorCollection columns)
		{
			if (!base.PrepareInsert(sender, row, columns))
			{
				return false;
			}

			DRExpenseProjectionAccum item = (DRExpenseProjectionAccum)row;
			columns.Update<DRExpenseProjectionAccum.pTDProjected>(item.PTDProjected, PXDataFieldAssign.AssignBehavior.Summarize);
			columns.Update<DRExpenseProjectionAccum.pTDRecognized>(item.PTDRecognized, PXDataFieldAssign.AssignBehavior.Summarize);
			columns.Update<DRExpenseProjectionAccum.pTDRecognizedSamePeriod>(item.PTDRecognizedSamePeriod, PXDataFieldAssign.AssignBehavior.Summarize);

			return true;
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:14,代码来源:Attribute.cs

示例10: RowUpdated

		private void RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
		{
			var val = (PropertyValue)e.Row;
			var oldValue = (PropertyValue)e.OldRow;
			if (Equals(val.Value, oldValue.Value)) return;

			var itemsCache = View.Cache;
			foreach (PropertyValue item in sender.Cached.
				Cast<PropertyValue>().
				Where(_ => _.Order > val.Order).
				OrderBy(_ => _.Order))
			{
				if (string.IsNullOrWhiteSpace(item.Name)) continue;

				var propertyInfo = itemsCache.GetType().GetProperty(item.Name);
				if (propertyInfo == null) continue;

				var verifier = Attribute.GetCustomAttribute(propertyInfo, PropertyMarkAttribute) as PXMassProcessFieldAttribute;
				if (verifier == null || verifier.SearchCommand == null) continue;

				var searchCommand = (BqlCommand)Activator.CreateInstance(verifier.SearchCommand);
				var verifingParams = new List<object>();
				var itemOrder = item.Order;
				foreach(IBqlParameter param in searchCommand.GetParameters())
				{
					var refType = param.GetReferencedType();
					if (refType == null) continue;

					var propVal = sender.Cached.Cast<PropertyValue>().FirstOrDefault(_ => _.Order < itemOrder && Equals(refType.Name, _.Name));
					verifingParams.Add(propVal.With(_ => _.Value));
				}

				int startRow = 0;
				int totalRows = 0;
				var searchResult = new PXView(Graph, true, searchCommand).
									Select(null, verifingParams.ToArray(),
										new object[] { item.Value },
										new string[] { ((IBqlSearch)searchCommand).GetField().Name },
										new bool[] { false },
										null, ref startRow, 1, ref totalRows);
				if (searchResult == null || searchResult.Count == 0)
				{
					item.Value = null;
				}
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:46,代码来源:MassProcessPropertyValueAttribute.cs

示例11: Location_VBranchID_FieldDefaulting

		protected override void Location_VBranchID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)
		{
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:3,代码来源:VendorLocationMaint.cs

示例12: LocationAPAccountSub_RowSelected

		protected virtual void LocationAPAccountSub_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
		{
            if (e.Row == null) return;

            if (Location.Current != null)
			{
				PXUIFieldAttribute.SetEnabled(sender, e.Row, object.Equals(Location.Current.LocationID, Location.Current.VAPAccountLocationID));
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:9,代码来源:VendorLocationMaint.cs

示例13: Location_CBranchID_FieldDefaulting

		protected virtual void Location_CBranchID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e)
		{
			e.NewValue = null;
			e.Cancel = true;
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:5,代码来源:VendorLocationMaint.cs

示例14: Address_RowSelected

		protected override void Address_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
		{
			Address row = e.Row as Address;
			if (row != null)
			{
				BAccount acct = BAccountUtility.FindAccount(this, row.BAccountID);
				bool isSameAsMain = false;
				if (acct != null)
				{
					isSameAsMain = (row.AddressID == acct.DefAddressID);
				}

				if (!isSameAsMain && Location.Current != null && APPaymentInfoLocation.Current != null && object.Equals(APPaymentInfoLocation.Current.VRemitAddressID, row.AddressID))
				{
					PXUIFieldAttribute.SetEnabled(sender, e.Row, object.Equals(Location.Current.LocationID, Location.Current.VPaymentInfoLocationID));
				}
				else
				{
					base.Address_RowSelected(sender, e);
				}
			}
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:22,代码来源:VendorLocationMaint.cs

示例15: LocationAPPaymentInfo_VCashAccountID_FieldDefaulting

		protected virtual void LocationAPPaymentInfo_VCashAccountID_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e) 
		{
			//LocationAPPaymentInfo row = (LocationAPPaymentInfo)e.Row;
			e.NewValue = null;
			e.Cancel = true;			
		}
开发者ID:PavelMPD,项目名称:SimpleProjects,代码行数:6,代码来源:VendorLocationMaint.cs


注:本文中的PXCache类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。