本文整理汇总了C#中Session.GetClassInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Session.GetClassInfo方法的具体用法?C# Session.GetClassInfo怎么用?C# Session.GetClassInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Session
的用法示例。
在下文中一共展示了Session.GetClassInfo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetClassTypeFilter
public static CriteriaOperator GetClassTypeFilter(this Type type, Session session) {
XPClassInfo xpClassInfo = session.GetClassInfo(type);
XPObjectType xpObjectType = session.GetObjectType(xpClassInfo);
return XPObject.Fields.ObjectType.IsNull() |
XPObject.Fields.ObjectType == new OperandValue(xpObjectType.Oid);
}
示例2: GetClassInfo
private XPClassInfo GetClassInfo(Session session, string assemblyQualifiedName, IEnumerable<Type> persistentTypes) {
Type classType = persistentTypes.Where(type => type.FullName == assemblyQualifiedName).SingleOrDefault();
if (classType != null) {
return session.GetClassInfo(classType);
}
return null;
}
示例3: CalcPurchOrderLine
private BindingList<PurchOrder_Receive> CalcPurchOrderLine(Session session)
{
BindingList<PurchOrder_Receive> poReceives = new BindingList<PurchOrder_Receive>();
XPClassInfo poLineClass;
CriteriaOperator criteria;
SortingCollection sortProps;
StringBuilder sbCriteria = new StringBuilder();
sbCriteria.Append(string.Format("OrderStatus = '{0}'", PurchOrderLine.PurchOrderStatus.Active));
if (txtItemNo.Text != "")
sbCriteria.Append(string.Format(" AND Item.ItemNo = '{0}'", txtItemNo.Text));
if (txtVendor.Text != "")
sbCriteria.Append(string.Format(" AND Vendor.No = '{0}'", txtVendor.Text));
poLineClass = session.GetClassInfo(typeof(PurchOrderLine));
criteria = CriteriaOperator.Parse(sbCriteria.ToString());
sortProps = new SortingCollection(null);
ICollection poLines = session.GetObjects(poLineClass, criteria, sortProps, int.MaxValue, false, true);
foreach (PurchOrderLine poLine in poLines)
{
PurchOrder_Receive poReceive = new PurchOrder_Receive();
poReceive.PurchOrderLine = poLine;
poReceive.Item = poLine.Item;
poReceive.ItemType = poLine.Item.ItemType;
poReceive.ReceivedWarehouse = poLine.Warehouse;
poReceives.Add(poReceive);
}
return poReceives;
}
示例4: GetTableName
public static string GetTableName(Type type, Session session)
{
return session.GetClassInfo(type).TableName;
}
示例5: GetXpMemberInfo
public static XPMemberInfo GetXpMemberInfo(Session session, Type type, string propertyName, bool throwIfMissing) {
XPClassInfo xpClassInfo = session.GetClassInfo(type);
return GetXpMemberInfo(xpClassInfo, propertyName, throwIfMissing);
}
示例6: ExecTurnOverCustomerAscendingIntoDataView
public static void ExecTurnOverCustomerAscendingIntoDataView(XPDataView dataView, Session session)
{
DevExpress.Xpo.DB.SelectedData sprocData = session.ExecuteSproc("TurnOverCustomerAscending");
dataView.PopulateProperties(session.GetClassInfo(typeof(TurnOverCustomerAscendingResult)));
dataView.LoadData(sprocData);
}
示例7: ExecTurnOverCustomerDescendingIntoDataView
public static XPDataView ExecTurnOverCustomerDescendingIntoDataView(Session session)
{
DevExpress.Xpo.DB.SelectedData sprocData = session.ExecuteSproc("TurnOverCustomerDescending");
return new XPDataView(session.Dictionary, session.GetClassInfo(typeof(TurnOverCustomerAscendingResult)), sprocData);
}
示例8: Execsp_helpdiagramsIntoDataView
public static void Execsp_helpdiagramsIntoDataView(XPDataView dataView, Session session, string diagramname, int owner_id)
{
DevExpress.Xpo.DB.SelectedData sprocData = session.ExecuteSproc("sp_helpdiagrams", new OperandValue(diagramname), new OperandValue(owner_id));
dataView.PopulateProperties(session.GetClassInfo(typeof(sp_helpdiagramsResult)));
dataView.LoadData(sprocData);
}
示例9: ExecVehicleNotRacedByPeriodeIntoDataView
public static void ExecVehicleNotRacedByPeriodeIntoDataView(XPDataView dataView, Session session, DateTime Date)
{
DevExpress.Xpo.DB.SelectedData sprocData = session.ExecuteSproc("VehicleNotRacedByPeriode", new OperandValue(Date));
dataView.PopulateProperties(session.GetClassInfo(typeof(VehicleNotRacedByPeriodeResult)));
dataView.LoadData(sprocData);
}
示例10: GetTargetClassInfo
/// <summary>
/// Gets the class info.
/// </summary>
/// <param name="session">The session.</param>
/// <returns>Class info</returns>
public XPClassInfo GetTargetClassInfo(Session session)
{
return session.GetClassInfo(AssemblyName, ClassName);
}