Пример #1
0
 public PayReesterRecordsForm(PayReester payReester)
 {
     this.notePayRelationsView = new NotePayRelationsView();
     this.payReesterRecordApxView = new PayReesterRecordApxView();
     this.InitializeComponent();
     this.payReester = payReester;
 }
Пример #2
0
 public ChangeStatusReesterForm(PayReester payReester)
     : this()
 {
     this.sfdStatus.Faset = FasetsEnum.PaymentReestrStatus;
     this.sfdStatus.RefreshValuesWithNull();
     this.sfdStatus.SelectedFasetItem = payReester.GetStatus();
     this.m_payReester = payReester;
 }
Пример #3
0
 public ChangeTypeReesterForm(PayReester payReester)
     : this()
 {
     this.sfdType.Faset = FasetsEnum.PaymentsReestrType;
     this.sfdType.RefreshValuesWithNull();
     this.sfdType.SelectedFasetItem = payReester.GetReeType();
     this.m_payReester = payReester;
 }
Пример #4
0
 public PayReesterMonitorForm(PayReester payReester)
 {
     this.InitializeComponent();
     this.timerUpdateStatistic.set_Enabled(false);
     this.timerUpdateStatistic.set_Interval((int) (System.Convert.ToInt32(this.nudUpdateInterval.Value) * 0x3e8));
     this.stats = new System.Data.DataTable("Статистика");
     this.stats.Columns.Add("Статус", typeof(string));
     this.stats.Columns.Add("Количество записей", typeof(int));
     this.m_PayReester = payReester;
     this.bufferStats = this.stats.Copy();
 }
Пример #5
0
 public ChangeResetServiceCodeForm(PayReester payReester)
     : this()
 {
     this.m_payReester = payReester;
     this.nudCode.set_Value((decimal) this.m_payReester.GetMaxSubServiceCode());
 }
Пример #6
0
 private void UpdateFieldReester(PayReester payReester)
 {
     PayReester reester = PayReester.FindById_Parallel(payReester.Id);
     payReester.StatusId = reester.StatusId;
     payReester.StatusName = reester.StatusName;
     payReester.Organization = reester.Organization;
     payReester.Number = reester.Number;
     payReester.FromDate = reester.FromDate;
     payReester.ToDate = reester.ToDate;
     payReester.Summ = reester.Summ;
     payReester.Records = reester.Records;
     payReester.ReeTypeId = reester.ReeTypeId;
     payReester.ReeTypeName = reester.ReeTypeName;
     payReester.PaymentSystemId = reester.PaymentSystemId;
     payReester.PaymentSystemName = reester.PaymentSystemName;
     payReester.PaymentSystem = reester.PaymentSystem;
 }
Пример #7
0
 public PayReesterRecordsForm(PayReester payReester, FasetItem status)
     : this(payReester)
 {
     this.payReesterRecordsView.PayReester = payReester;
     this.payReesterRecordsView.Filter(Constants.NullDate, string.Empty, status);
 }
Пример #8
0
 private void InitializeComponent()
 {
     PayReester reester = new PayReester();
     this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     this.поискToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.выходToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.tab = new System.Windows.Forms.TabControl();
     this.tabReesterRecordApx = new System.Windows.Forms.TabPage();
     this.tabChargeRelations = new System.Windows.Forms.TabPage();
     this.chargePayRelationsView = new JnPayRelationsView();
     this.tabPaymentRelations = new System.Windows.Forms.TabPage();
     this.paymentPayRelationsView = new JnPayRelationsView();
     this.tabIndicationRelations = new System.Windows.Forms.TabPage();
     this.counterIndicationPayRelationsView = new CounterIndicationPayRelationsView();
     this.tabAccountServices = new System.Windows.Forms.TabPage();
     this.accountServicesDecomposeView = new AccountServicesDecomposeView();
     this.payReesterRecordsView = new PayReesterRecordsView();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.menuStrip1.SuspendLayout();
     this.tab.SuspendLayout();
     this.tabChargeRelations.SuspendLayout();
     this.tabPaymentRelations.SuspendLayout();
     this.tabIndicationRelations.SuspendLayout();
     this.tabAccountServices.SuspendLayout();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     base.SuspendLayout();
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.поискToolStripMenuItem, this.выходToolStripMenuItem });
     this.menuStrip1.set_Location(new System.Drawing.Point(0, 0));
     this.menuStrip1.set_Name("menuStrip1");
     this.menuStrip1.set_ShowItemToolTips(true);
     this.menuStrip1.set_Size(new System.Drawing.Size(0x32f, 0x1a));
     this.menuStrip1.set_TabIndex(1);
     this.menuStrip1.set_Text("menuStrip1");
     this.поискToolStripMenuItem.set_Image(Resources.SEARCH);
     this.поискToolStripMenuItem.set_ImageScaling(System.Windows.Forms.ToolStripItemImageScaling.None);
     this.поискToolStripMenuItem.set_Name("поискToolStripMenuItem");
     this.поискToolStripMenuItem.set_ShortcutKeys(System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F);
     this.поискToolStripMenuItem.set_ShowShortcutKeys(false);
     this.поискToolStripMenuItem.set_Size(new System.Drawing.Size(0x49, 0x16));
     this.поискToolStripMenuItem.set_Text("Поиск");
     this.поискToolStripMenuItem.set_ToolTipText("Поиск записей (Ctrl+F)");
     this.поискToolStripMenuItem.add_Click(new System.EventHandler(this.поискToolStripMenuItem_Click));
     this.выходToolStripMenuItem.set_Image(Resources.EXIT);
     this.выходToolStripMenuItem.set_ImageScaling(System.Windows.Forms.ToolStripItemImageScaling.None);
     this.выходToolStripMenuItem.set_Name("выходToolStripMenuItem");
     this.выходToolStripMenuItem.set_ShortcutKeys(System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q);
     this.выходToolStripMenuItem.set_ShowShortcutKeys(false);
     this.выходToolStripMenuItem.set_Size(new System.Drawing.Size(0x47, 0x16));
     this.выходToolStripMenuItem.set_Text("Выход");
     this.выходToolStripMenuItem.add_Click(new System.EventHandler(this.выходToolStripMenuItem_Click));
     this.tab.Controls.Add(this.tabReesterRecordApx);
     this.tab.Controls.Add(this.tabChargeRelations);
     this.tab.Controls.Add(this.tabPaymentRelations);
     this.tab.Controls.Add(this.tabIndicationRelations);
     this.tab.Controls.Add(this.tabAccountServices);
     this.tab.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.tab.set_Location(new System.Drawing.Point(0, 0));
     this.tab.set_Name("tab");
     this.tab.set_SelectedIndex(0);
     this.tab.set_Size(new System.Drawing.Size(0x32f, 0x10b));
     this.tab.set_TabIndex(2);
     this.tab.add_SelectedIndexChanged(new System.EventHandler(this.tab_SelectedIndexChanged));
     this.tabReesterRecordApx.set_Location(new System.Drawing.Point(4, 0x16));
     this.tabReesterRecordApx.set_Name("tabReesterRecordApx");
     this.tabReesterRecordApx.set_Padding(new System.Windows.Forms.Padding(3));
     this.tabReesterRecordApx.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.tabReesterRecordApx.set_TabIndex(6);
     this.tabReesterRecordApx.set_Text("Дополнение");
     this.tabReesterRecordApx.set_UseVisualStyleBackColor(true);
     this.tabChargeRelations.Controls.Add(this.chargePayRelationsView);
     this.tabChargeRelations.set_Location(new System.Drawing.Point(4, 0x16));
     this.tabChargeRelations.set_Name("tabChargeRelations");
     this.tabChargeRelations.set_Padding(new System.Windows.Forms.Padding(3));
     this.tabChargeRelations.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.tabChargeRelations.set_TabIndex(1);
     this.tabChargeRelations.set_Text("Начисления");
     this.tabChargeRelations.set_UseVisualStyleBackColor(true);
     this.chargePayRelationsView.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.chargePayRelationsView.set_Location(new System.Drawing.Point(3, 3));
     this.chargePayRelationsView.set_Name("chargePayRelationsView");
     this.chargePayRelationsView.set_Size(new System.Drawing.Size(0x2b9, 0x6c));
     this.chargePayRelationsView.set_TabIndex(2);
     this.tabPaymentRelations.Controls.Add(this.paymentPayRelationsView);
     this.tabPaymentRelations.set_Location(new System.Drawing.Point(4, 0x16));
     this.tabPaymentRelations.set_Name("tabPaymentRelations");
     this.tabPaymentRelations.set_Padding(new System.Windows.Forms.Padding(3));
     this.tabPaymentRelations.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.tabPaymentRelations.set_TabIndex(2);
     this.tabPaymentRelations.set_Text("Оплата");
     this.tabPaymentRelations.set_UseVisualStyleBackColor(true);
     this.paymentPayRelationsView.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.paymentPayRelationsView.set_Location(new System.Drawing.Point(3, 3));
     this.paymentPayRelationsView.set_Name("paymentPayRelationsView");
     this.paymentPayRelationsView.set_Size(new System.Drawing.Size(0x2b9, 0x6c));
     this.paymentPayRelationsView.set_TabIndex(1);
     this.tabIndicationRelations.Controls.Add(this.counterIndicationPayRelationsView);
     this.tabIndicationRelations.set_Location(new System.Drawing.Point(4, 0x16));
     this.tabIndicationRelations.set_Name("tabIndicationRelations");
     this.tabIndicationRelations.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.tabIndicationRelations.set_TabIndex(4);
     this.tabIndicationRelations.set_Text("Показания");
     this.tabIndicationRelations.set_UseVisualStyleBackColor(true);
     this.counterIndicationPayRelationsView.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.counterIndicationPayRelationsView.set_Location(new System.Drawing.Point(0, 0));
     this.counterIndicationPayRelationsView.set_Name("counterIndicationPayRelationsView");
     this.counterIndicationPayRelationsView.set_Size(new System.Drawing.Size(0x2bf, 0x72));
     this.counterIndicationPayRelationsView.set_TabIndex(0);
     this.tabAccountServices.Controls.Add(this.accountServicesDecomposeView);
     this.tabAccountServices.set_Location(new System.Drawing.Point(4, 0x16));
     this.tabAccountServices.set_Name("tabAccountServices");
     this.tabAccountServices.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.tabAccountServices.set_TabIndex(5);
     this.tabAccountServices.set_Text("Разложить вручную");
     this.tabAccountServices.set_UseVisualStyleBackColor(true);
     this.accountServicesDecomposeView.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.accountServicesDecomposeView.set_Location(new System.Drawing.Point(0, 0));
     this.accountServicesDecomposeView.set_Name("accountServicesDecomposeView");
     this.accountServicesDecomposeView.set_Size(new System.Drawing.Size(0x327, 0xf1));
     this.accountServicesDecomposeView.set_TabIndex(0);
     this.payReesterRecordsView.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.payReesterRecordsView.set_Location(new System.Drawing.Point(0, 0));
     this.payReesterRecordsView.set_Name("payReesterRecordsView");
     reester.Created = new System.DateTime(0L);
     reester.Dateb = new System.DateTime(0L);
     reester.Datec = new System.DateTime(0L);
     reester.Datee = new System.DateTime(0L);
     reester.FromDate = new System.DateTime(0L);
     reester.Id = 0L;
     reester.IsDeleted = false;
     reester.IsDirty = true;
     reester.Number = null;
     reester.ObjectWithIdType = null;
     reester.Organization = null;
     reester.OrganizationId = 0L;
     reester.OrganizationName = null;
     reester.OrgDocument = null;
     reester.OrgDocumentId = 0L;
     reester.OrgDocumentView = null;
     reester.PaymentSystem = null;
     reester.PaymentSystemId = 0L;
     reester.PaymentSystemName = null;
     reester.Records = 0;
     reester.ReeTypeId = 0;
     reester.ReeTypeName = null;
     reester.StatusId = 0;
     reester.StatusName = null;
     int[] numArray = new int[4];
     reester.Summ = new decimal(numArray);
     reester.ToDate = new System.DateTime(0L);
     this.payReesterRecordsView.PayReester = reester;
     this.payReesterRecordsView.set_Size(new System.Drawing.Size(0x32f, 270));
     this.payReesterRecordsView.set_TabIndex(1);
     this.splitContainer1.set_Dock(System.Windows.Forms.DockStyle.Fill);
     this.splitContainer1.set_Location(new System.Drawing.Point(0, 0x1a));
     this.splitContainer1.set_Name("splitContainer1");
     this.splitContainer1.set_Orientation(System.Windows.Forms.Orientation.Horizontal);
     this.splitContainer1.Panel1.Controls.Add(this.payReesterRecordsView);
     this.splitContainer1.Panel2.Controls.Add(this.tab);
     this.splitContainer1.set_Size(new System.Drawing.Size(0x32f, 0x21d));
     this.splitContainer1.set_SplitterDistance(270);
     this.splitContainer1.set_TabIndex(3);
     base.set_AutoScaleDimensions(new System.Drawing.SizeF(6f, 13f));
     base.set_AutoScaleMode(System.Windows.Forms.AutoScaleMode.Font);
     base.set_ClientSize(new System.Drawing.Size(0x32f, 0x237));
     base.Controls.Add(this.splitContainer1);
     base.Controls.Add(this.menuStrip1);
     base.set_MainMenuStrip(this.menuStrip1);
     base.set_Name("PayReesterRecordsForm");
     base.set_ShowIcon(false);
     base.set_StartPosition(System.Windows.Forms.FormStartPosition.CenterScreen);
     this.set_Text("Записи реестра");
     base.set_WindowState(System.Windows.Forms.FormWindowState.Maximized);
     base.add_Load(new System.EventHandler(this.PayReesterRecordsForm_Load));
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     this.tab.ResumeLayout(false);
     this.tabChargeRelations.ResumeLayout(false);
     this.tabPaymentRelations.ResumeLayout(false);
     this.tabIndicationRelations.ResumeLayout(false);
     this.tabAccountServices.ResumeLayout(false);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.ResumeLayout(false);
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Пример #9
0
 public void Fill(AIS.SN.Model.DomainObjects.PayReester payReester)
 {
     this.mPayReester = payReester;
     this.UpdateView();
 }
Пример #10
0
 public void Clear()
 {
     this.mPayReester = AIS.SN.Model.DomainObjects.PayReester.Null;
     this.UpdateView();
 }
Пример #11
0
 private void m_FileLoadWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     this.m_LoadButton.set_Image(null);
     System.Exception error = e.Error;
     if (error != null)
     {
         System.ApplicationException ex = new System.ApplicationException("Реестр не был загружен.", error);
         Messages.ShowException(this, ex);
     }
     else
     {
         this.LoadedReester = (PayReester) e.get_Result();
         base.set_DialogResult(System.Windows.Forms.DialogResult.Yes);
     }
 }
Пример #12
0
 private static void LoadPaymentsFromFile(PayReester payReester, System.IO.FileInfo sourceFile, string encoding)
 {
     payReester.ReeTypeId = FasetItem.FindByName(FasetsEnum.PaymentsReestrType, "Наличные платежи").Id;
     using (System.IO.StreamReader reader = new System.IO.StreamReader(sourceFile.get_FullName(), System.Text.Encoding.GetEncoding(string.IsNullOrEmpty(encoding) ? ((string) "CP866") : encoding)))
     {
         string str;
         while ((str = reader.ReadLine()) != null)
         {
             str = str.Trim();
             new PayReesterRecord { ReesterId = payReester.Id, StatusId = payReester.StatusId, Apx = str }.SaveChanges();
         }
         payReester.Prepare();
     }
 }
Пример #13
0
 private static void LoadPaymentsFromDbf(PayReester payReester, System.IO.FileInfo sourceFile)
 {
     string str = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "PAY.DBF");
     System.IO.FileInfo info = sourceFile.CopyTo(str, true);
     System.Data.DataTable table = DALOdbc.ExecuteDataTable(DbfFormat.dBaseIV, info.get_DirectoryName(), "select * from " + info.get_Name());
     info.Delete();
     if (table.Rows.get_Count() > 0)
     {
         System.Data.DataTable insertData = new System.Data.DataTable();
         insertData.Columns.Add("reesterId", System.Type.GetType("System.Int64"));
         insertData.Columns.Add("apx", System.Type.GetType("System.String"));
         insertData.Columns.Add("statusId", System.Type.GetType("System.Int64"));
         foreach (System.Data.DataRow row in table.Rows)
         {
             System.Data.DataRow row2 = insertData.NewRow();
             row2.set_Item("reesterId", (long) payReester.Id);
             row2.set_Item("statusId", (int) payReester.StatusId);
             System.Text.StringBuilder builder = new System.Text.StringBuilder();
             foreach (System.Data.DataColumn column in table.Columns)
             {
                 builder.Append(column.get_Caption());
                 builder.Append("=");
                 builder.Append(row.get_Item(column).ToString().Replace(";", "").Replace("=", ""));
                 builder.Append(';');
             }
             row2.set_Item("apx", builder.ToString());
             insertData.Rows.Add(row2);
         }
         DALSql.BulkCopy("pay.ReesterRecords", insertData);
         payReester.Prepare();
     }
 }
Пример #14
0
 private static void LoadCashlessPaymentsFromSalary(PayReester payReester, System.IO.FileInfo sourceFile)
 {
     System.Globalization.CultureInfo info = new System.Globalization.CultureInfo("en-US", true);
     info.DateTimeFormat.set_ShortDatePattern("dd'.'MM'.'yyyy HH':'mm':'ss");
     info.NumberFormat.set_NumberDecimalSeparator(".");
     info.NumberFormat.set_NumberDecimalDigits(2);
     payReester.ReeTypeId = FasetItem.FindByName(FasetsEnum.PaymentsReestrType, "Безналичные платежи").Id;
     using (System.IO.StreamReader reader = new System.IO.StreamReader(sourceFile.get_FullName(), System.Text.Encoding.GetEncoding(0x362)))
     {
         string str;
         while ((str = reader.ReadLine()) != null)
         {
             int num;
             decimal num2;
             System.DateTime time;
             string str2;
             string str3;
             PayReesterRecord record;
             str = str.Trim();
             if (!str.StartsWith("#"))
             {
                 goto Label_01BA;
             }
             try
             {
                 str2 = str.Substring(1, (int) (str.IndexOfAny((char[]) new char[] { ' ', '\t' }) - 1)).Trim().ToUpper();
                 str3 = str.Substring((int) (str.IndexOfAny((char[]) new char[] { ' ', '\t' }) + 1)).Trim();
             }
             catch
             {
                 continue;
             }
             string str4 = str2;
             if (str4 != null)
             {
                 if (str4 != "ORGCODE")
                 {
                     if (str4 == "FILESUM")
                     {
                         goto Label_0147;
                     }
                     if (str4 == "COUNT")
                     {
                         goto Label_0168;
                     }
                     if (str4 == "PERIODB")
                     {
                         goto Label_0182;
                     }
                     if (str4 == "PERIODE")
                     {
                         goto Label_019E;
                     }
                 }
                 else
                 {
                     payReester.Organization = str3;
                 }
             }
             continue;
         Label_0147:
             if (decimal.TryParse(str3, System.Globalization.NumberStyles.Currency, info, ref num2))
             {
                 payReester.Summ = num2;
             }
             continue;
         Label_0168:
             if (int.TryParse(str3, System.Globalization.NumberStyles.Currency, info, ref num))
             {
                 payReester.Records = num;
             }
             continue;
         Label_0182:
             if (System.DateTime.TryParseExact(str3, "dd'.'MM'.'yyyy", info, System.Globalization.DateTimeStyles.AllowWhiteSpaces, ref time))
             {
                 payReester.FromDate = time;
             }
             continue;
         Label_019E:
             if (System.DateTime.TryParseExact(str3, "dd'.'MM'.'yyyy", info, System.Globalization.DateTimeStyles.AllowWhiteSpaces, ref time))
             {
                 payReester.ToDate = time;
             }
             continue;
         Label_01BA:
             record = new PayReesterRecord();
             record.ReesterId = payReester.Id;
             record.StatusId = payReester.StatusId;
             record.Apx = str;
             record.SaveChanges();
         }
     }
 }
Пример #15
0
 public static PayReester SaveCityReesterToDatabase(Reester248 fileRee, PayPaymentSystem paymentSystem, AIS.SN.Model.DomainObjects.Organization agent)
 {
     PayReester reester = new PayReester {
         PaymentSystem = "Система \"Город\"",
         PaymentSystemId = paymentSystem.Id,
         Number = ((int) fileRee.Number).ToString()
     };
     FasetItem item = FasetItem.FindByName(FasetsEnum.PaymentsReestrType, Reester.GetTypeDescription(fileRee.ReeType));
     reester.ReeTypeId = item.Id;
     FasetItem item2 = FasetItem.FindByName(FasetsEnum.PaymentReestrStatus, "Загружен");
     reester.StatusId = item2.Id;
     reester.Created = fileRee.Created;
     reester.FromDate = fileRee.FromDate;
     reester.ToDate = fileRee.ToDate;
     reester.Organization = ((int) fileRee.AgentId).ToString();
     reester.OrganizationId = agent.Id;
     reester.Summ = fileRee.ReeSumm;
     reester.Records = fileRee.RecCount;
     reester.PaymentService = ((int) fileRee.Service).ToString();
     reester.SaveChanges();
     foreach (Record record in fileRee.Records)
     {
         PayReesterRecord record2;
         new PayReesterRecord { ReesterId = reester.Id, StatusId = reester.StatusId, AccountNumber = record.acc_pu, AbonentName = record.fio, Address = record.address, SubService = record.sub_srv_pu, PaymentSumm = record.summ, Period = record.dateb.get_HasValue() ? record.dateb.Value : record2.Period, Apx = record.apx, PaymentDate = record.created.get_HasValue() ? record.created.Value : record2.PaymentDate, ExternalTransactionId = record.uno.ToString() }.SaveChanges();
     }
     reester.Prepare();
     return reester;
 }
Пример #16
0
 public static PayReester LoadReesterFromFile(string sourceFileName, PayPaymentSystem paymentSystem, AIS.SN.Model.DomainObjects.Organization agent, FasetItem reesterType, System.DateTime paymentOrderDate, System.DateTime paymentOrderPeriod)
 {
     PayReester reester2;
     try
     {
         System.IO.FileInfo sourceFile = new System.IO.FileInfo(sourceFileName);
         if (!System.IO.File.Exists(sourceFile.get_FullName()))
         {
             throw new System.ApplicationException(string.Format("Файл {0} не существует", sourceFile));
         }
         PayReester payReester = new PayReester {
             PaymentSystemId = paymentSystem.Id,
             Organization = agent.ShortName,
             OrganizationId = agent.Id,
             Created = DALSql.GetDatabaseTime(),
             Number = sourceFile.get_Name().Substring(0, (int) (sourceFile.get_Name().get_Length() - sourceFile.get_Extension().get_Length())),
             StatusId = FasetItem.FindByName(FasetsEnum.PaymentReestrStatus, "Загружен").Id,
             PaymentOrderDate = paymentOrderDate,
             PaymentOrderPeriod = paymentOrderPeriod
         };
         if (reesterType != FasetItem.Null)
         {
             payReester.ReeTypeId = reesterType.Id;
         }
         payReester.SaveChanges();
         if (sourceFile.get_Extension().ToUpper() == ".DBF")
         {
             LoadPaymentsFromDbf(payReester, sourceFile);
         }
         else if ((sourceFile.get_Extension().ToUpper() == ".TXT") && (paymentSystem.Name == "Безналичные платежи с зарплаты"))
         {
             LoadCashlessPaymentsFromSalary(payReester, sourceFile);
         }
         else
         {
             try
             {
                 LoadPaymentsFromFile(payReester, sourceFile, paymentSystem.Encoding);
                 return payReester;
             }
             catch (System.Exception exception)
             {
                 payReester.Delete();
                 throw new System.ApplicationException("Не удалось прочитать данные из файла " + sourceFile.get_Name() + " или выполнить обработку реестра. Содержание ошибки: " + exception.get_Message());
             }
         }
         payReester.SaveChanges();
         reester2 = payReester;
     }
     catch (System.Exception exception2)
     {
         throw new System.ApplicationException("Ошибка при загрузке файла реестра " + sourceFileName + ", возможно данный реестр уже был загружен", exception2);
     }
     return reester2;
 }