本文整理汇总了C#中ObjectList.ApplySort方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectList.ApplySort方法的具体用法?C# ObjectList.ApplySort怎么用?C# ObjectList.ApplySort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectList
的用法示例。
在下文中一共展示了ObjectList.ApplySort方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PaymentReportByJournal_Load
private void PaymentReportByJournal_Load(object sender, System.EventArgs e)
{
this.set_Font(Manager.WindowFont);
base.m_Period.DateBegin = System.DateTime.Now;
base.m_Period.DateEnd = System.DateTime.Now;
this.sfdPaymentType.Faset = FasetsEnum.PaymentAgentType;
this.sfdPaymentType.Items.Add(FasetItem.Null);
this.sfdPaymentType.RefreshValuesWithNull();
this.sfdPaymentType.SelectedFasetItem = FasetItem.FindById(Settings.Default.CashierCashFlowType);
ObjectList<PayTerminals> list = new ObjectList<PayTerminals> {
PayTerminals.Null
};
list.AddRange(Mappers.PayTerminalMapper.FindAll());
list.ApplySort("Name");
this.m_CashierTerminalNumber.set_DataSource(list);
ObjectList<User> list2 = new ObjectList<User> {
User.Null
};
list2.AddRange(User.FindAll());
list2.ApplySort("Name");
this.bsUsers.set_DataSource(list2);
this.bsUsers.set_Position(this.bsUsers.IndexOf(User.GetCurrentUser()));
if (!User.IsMemberOf(RightsEnum.ПросмотрВАРМКассирВсехПлатежей))
{
this.cbUser.set_Enabled(false);
}
else
{
this.cbUser.set_Enabled(true);
}
}
示例2: GetByStatus
public static ObjectList<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress> GetByStatus(ExchangeStatus status, Area filterArea)
{
System.Collections.Generic.List<long> addresses = new System.Collections.Generic.List<long>();
ObjectList<ExchangeRequest> exchangeRequestsGroup = ExchangeRequest.GetExchangeRequestsGroup(ExchangeRequestType.Address, status);
ObjectList<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress> list3 = new ObjectList<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress>();
foreach (ExchangeRequest request in exchangeRequestsGroup)
{
AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress address = Serializer.FromXml<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress>(request.XmlIn);
address.DateIn = request.DateIn;
address.ExchangeRequestId = request.Id;
address.LocalAddressId = request.AddressId;
if (address.LocalAddressId != LocalAddress.Null.Id)
{
addresses.Add(address.LocalAddressId);
}
address.Address = string.Concat((string[]) new string[] { ((address.LastChangeDate != Constants.NullDate) ? ((string) address.LastChangeDate.ToShortDateString()) : ((string) address.DateIn.ToShortDateString())), ";", address.StreetSocr, " ", address.Street, ";", address.HouseSocr, " ", address.House, ";", address.FlatSocr, " ", address.Flat });
list3.Add(address);
}
ObjectList<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress> list4 = new ObjectList<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress>();
if ((filterArea == null) || (filterArea == Area.Null))
{
return list3.ApplySort("Address");
}
Area lhs = new Area {
StatusTemporary = 1
};
lhs.SaveChanges();
lhs.SaveAddresses(addresses);
System.Collections.Generic.IList<long> filteredApartmentLocalAddresses = Area.GetFilteredApartmentLocalAddresses(lhs, filterArea);
for (int i = 0; i < list3.get_Count(); i = (int) (i + 1))
{
long num2 = (list3.get_Item(i).RemoteAddressId == 0L) ? list3.get_Item(i).LocalAddressId : list3.get_Item(i).RemoteAddressId;
if (filteredApartmentLocalAddresses.Contains(num2))
{
list4.Add(list3.get_Item(i));
}
}
return list4.ApplySort("Address");
}
示例3: m_SearchWorker_DoWork
private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
{
ObjectList<Apartment> list = new ObjectList<Apartment>();
if (this.m_SearchByNumbersRadio.get_Checked())
{
string apartmentNumber = this.m_ApartmentNumberEdit.get_Text().Trim();
string accountNumber = this.m_AccountEdit.get_Text().Trim();
list = Apartment.Search(apartmentNumber, accountNumber, LocalAddress.Null.Id, string.Empty, this.chxShowClose.get_Checked(), string.Empty);
if (string.IsNullOrEmpty(apartmentNumber) && string.IsNullOrEmpty(accountNumber))
{
this.addressesSearch.Clear();
for (int i = 0; i < LocalAddress.GetUserAddresses().get_Count(); i = (int) (i + 1))
{
this.addressesSearch.Add(LocalAddress.GetUserAddresses().get_Item(i));
}
}
if (!string.IsNullOrEmpty(apartmentNumber) || !string.IsNullOrEmpty(accountNumber))
{
if (list.get_Count() == 0)
{
System.Windows.Forms.MessageBox.Show("По Вашему запросу не найдено адреса.", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
this.flag = true;
}
else
{
this.addressesSearch.Clear();
this.addressesSearch.Add(LocalAddress.FindById(list.get_Item(0).AdrId));
}
}
}
else
{
LocalAddress selectedAddress = this.m_LocalAddressSelector.GetSelectedAddress();
string ownerName = this.m_OwnerNameEdit.get_Text();
if ((selectedAddress == LocalAddress.Null) && string.IsNullOrEmpty(ownerName))
{
list = Apartment.Search(string.Empty, string.Empty, LocalAddress.Null.Id, string.Empty, this.chxShowClose.get_Checked(), string.Empty);
this.addressesSearch.Clear();
for (int j = 0; j < LocalAddress.GetUserAddresses().get_Count(); j = (int) (j + 1))
{
this.addressesSearch.Add(LocalAddress.GetUserAddresses().get_Item(j));
}
}
else if ((selectedAddress != LocalAddress.Null) || !string.IsNullOrEmpty(ownerName))
{
list = Apartment.Search(string.Empty, string.Empty, selectedAddress.Id, ownerName, this.chxShowClose.get_Checked(), string.Empty);
if (list.get_Count() == 0)
{
System.Windows.Forms.MessageBox.Show("По Вашему запросу не найдено адреса.", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
this.flag = true;
}
else
{
this.addressesSearch.Clear();
if (selectedAddress != LocalAddress.Null)
{
this.addressesSearch.Add(selectedAddress);
}
else
{
this.addressesSearch.Add(LocalAddress.FindById(list.get_Item(0).AdrId));
}
}
}
}
list.ApplySort("AddressName");
e.set_Result(list);
}