本文整理汇总了C#中Customer.Reload方法的典型用法代码示例。如果您正苦于以下问题:C# Customer.Reload方法的具体用法?C# Customer.Reload怎么用?C# Customer.Reload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer.Reload方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOwner
public Services.Packages.Security.ModelUser GetOwner(Customer _Customer, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
//*
if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Customer.Owner, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Customer.Owner;
}
示例2: GetPartnerCustomers
public Services.Packages.CustomerCollection GetPartnerCustomers(Customer _Customer, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer.PartnerCustomers, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Customer.PartnerCustomers;
}
示例3: CreateObjectFromPartner
public void CreateObjectFromPartner(Customer _Customer, Services.Packages.Customer _Partner, string SessionToken)
{
ModelSession session = CustomerSecureService.CheckSessionImp(SessionToken);
//if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Partner, SessionToken, "Create PartnerCustomers"))
// throw new UnauthorizedAccessException("Access Denied");
_Customer.Reload();
if (!_Customer.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Partner, SessionToken, "Create PartnerCustomers"))
throw new UnauthorizedAccessException("Access Denied");
else if (_Customer.Exists && !CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
_Customer.Owner = session.User;
_Customer.Partner = _Partner;
_Customer.Create();
}
示例4: GetLicensesIssued
public Services.Packages.ApiKeyCollection GetLicensesIssued(Customer _Customer, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_Customer.LicensesIssued, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Customer.LicensesIssued;
}
示例5: SetACLs
public void SetACLs(Customer _Customer, Services.Packages.Security.CustomerAccessControlListCollection _ACLs, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
_ACLs.Reload();
if (_ACLs.Exists && !Services.Packages.Security.Security.CustomerAccessControlListSecureService.CheckAccessImp(_ACLs, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
else if (!_ACLs.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Create ACLs"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Customer.ACLs = _ACLs;
_Customer.Update();
}
示例6: SetCustomerUserEntries
public void SetCustomerUserEntries(Customer _Customer, Services.Packages.CustomerUserEntryCollection _CustomerUserEntries, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
_CustomerUserEntries.Reload();
if (_CustomerUserEntries.Exists && !Services.Packages.Security.CustomerUserEntrySecureService.CheckAccessImp(_CustomerUserEntries, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
else if (!_CustomerUserEntries.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Create CustomerUserEntries"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Customer.CustomerUserEntries = _CustomerUserEntries;
_Customer.Update();
}
示例7: SetLicensesIssued
public void SetLicensesIssued(Customer _Customer, Services.Packages.ApiKeyCollection _LicensesIssued, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
_LicensesIssued.Reload();
if (_LicensesIssued.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_LicensesIssued, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
else if (!_LicensesIssued.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Create LicensesIssued"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Customer.LicensesIssued = _LicensesIssued;
_Customer.Update();
}
示例8: SetOwner
public void SetOwner(Customer _Customer, Services.Packages.Security.ModelUser _Owner, string SessionToken)
{
_Customer.Reload();
//*
if (!Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
//*
_Owner.Reload();
if (_Owner.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
else if (!_Owner.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Create CustomerOwning"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Customer.Owner = _Owner;
_Customer.Update();
}
示例9: Reload
public Customer Reload(Customer _Customer, string SessionToken)
{
_Customer.Reload();
if (!CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
return _Customer;
}