Example #1
0
 private void tpLast_Enter(object sender, System.EventArgs e)
 {
     this.btnBack.set_Enabled(true);
     this.btnForward.set_Enabled(false);
     System.Collections.Generic.List<string> errors = new System.Collections.Generic.List<string>();
     System.Collections.Generic.List<string> warnings = new System.Collections.Generic.List<string>();
     this.GlobalCheck(errors, warnings);
     if (errors.get_Count() > 0)
     {
         this.lblErrors.set_Text("Обнаружено ошибок: " + ((int) errors.get_Count()));
         this.lblErrors.set_ForeColor(System.Drawing.Color.Maroon);
     }
     else
     {
         this.lblErrors.set_Text("Ошибок не обнаружено");
         this.lblErrors.set_ForeColor(System.Drawing.Color.DarkGreen);
     }
     if (warnings.get_Count() > 0)
     {
         this.lblWarnings.set_Text("Предупреждений: " + ((int) warnings.get_Count()));
         this.lblWarnings.set_ForeColor(System.Drawing.Color.Maroon);
     }
     else
     {
         this.lblWarnings.set_Text("Предупреждений нет");
         this.lblWarnings.set_ForeColor(System.Drawing.Color.DarkGreen);
     }
     this.tbErrors.set_Lines(errors.ToArray());
     this.tbWarnings.set_Lines(warnings.ToArray());
     this.BtnApply.set_Enabled((bool) (errors.get_Count() == 0));
 }
 private static long[] ProcessDataPassporter(AIS.SN.Model.localhost.ExchangeRequestAddress[] addresses)
 {
     System.Collections.Generic.List<long> list = new System.Collections.Generic.List<long>();
     AIS.SN.Model.localhost.ExchangeRequestAddress[] addressArray = addresses;
     for (int i = 0; i < addressArray.Length; i = (int) (i + 1))
     {
         AIS.SN.Model.localhost.ExchangeRequestAddress address = addressArray[i];
         long[] outs = address.Outs;
         for (int k = 0; k < outs.Length; k = (int) (k + 1))
         {
             long num = outs[k];
             list.Add(num);
         }
         AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress snAddress = GetAddresses(address);
         if (!IsRejected(snAddress))
         {
             string str = Serializer.ToXml<AIS.SN.Model.DomainObjects.Views.ExchangeRequestAddress>(snAddress, (System.Text.Encoding) System.Text.Encoding.Unicode);
             new ExchangeRequest { QueryId = "", Type = -1, XmlIn = str, Status = ExchangeStatus.Received, DateIn = System.DateTime.Now, OperationDate = snAddress.LastChangeDate, OutId = snAddress.FlatCardId }.SaveChanges();
         }
     }
     long[] numArray = new long[list.get_Count()];
     for (int j = 0; j < list.get_Count(); j = (int) (j + 1))
     {
         numArray[j] = list.get_Item(j);
     }
     return numArray;
 }
Example #3
0
 public void RemoveNodesByLocalAddress(ObjectList<LocalAddress> addressesSource, ObjectList<LocalAddress> la)
 {
     System.Collections.Generic.List<LocalAddress> list = new System.Collections.Generic.List<LocalAddress>();
     foreach (LocalAddress address in la)
     {
         LocalAddress address2 = address;
         while (true)
         {
             LocalAddress parent = address2.GetParent();
             if (parent == LocalAddress.Null)
             {
                 break;
             }
             list.Add(parent);
             address2 = parent;
         }
         if (list.get_Count() == 0)
         {
             this.Load(addressesSource, false);
             return;
         }
         for (int i = (int) (list.get_Count() - 1); i >= 0; i = (int) (i - 1))
         {
             this.GetNodeByAddress(list.get_Item(i)).OnBeforeExpand();
         }
         AddressesNode nodeByAddress = this.GetNodeByAddress(address);
         if (nodeByAddress != null)
         {
             this.RemoveNode(nodeByAddress);
         }
         list.Clear();
     }
     if (this.OnChangeSelectAddresses != null)
     {
         this.OnChangeSelectAddresses();
     }
 }