Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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");
 }
Exemplo n.º 3
0
 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);
 }