public void Fill(PayReesterRecord payReesterRecord)
 {
     if (this.mPayReesterReesterRecord != payReesterRecord)
     {
         this.mPayReesterReesterRecord = payReesterRecord;
         this.UpdateView();
     }
 }
Exemplo n.º 2
0
 private void FillRecordApxView(PayReesterRecord payReesterRecord)
 {
     this.UnvisibleReesterRecordApxViews();
     if (payReesterRecord != PayReesterRecord.Null)
     {
         FasetItem recordStorageFormat;
         try
         {
             recordStorageFormat = payReesterRecord.GetReester().GetPaymentSystem().GetRecordStorageFormat();
         }
         catch (System.Exception exception)
         {
             throw new System.ApplicationException("Не найден формат хранения записи реестра для платежной системы.", exception);
         }
         string name = recordStorageFormat.Name;
         if (name == null)
         {
             goto Label_0192;
         }
         if (name != "Значения через запятую")
         {
             if (name == "Значения через двоеточие")
             {
                 this.tabReesterRecordApx.SuspendLayout();
                 this.tabReesterRecordApx.set_TabIndex(this.tabReesterRecordApx.Controls.IndexOf(this.payReesterRecordApxView));
                 this.payReesterRecordApxView.set_Enabled(true);
                 this.payReesterRecordApxView.set_Visible(true);
                 this.payReesterRecordApxView.Fill(payReesterRecord);
                 this.tabReesterRecordApx.ResumeLayout();
                 return;
             }
             if (name == "Значения через точку с запятой")
             {
                 return;
             }
             if (name == "\"Поле=Значение\" через точку с запятой")
             {
                 this.tabReesterRecordApx.SuspendLayout();
                 this.tabReesterRecordApx.set_TabIndex(this.tabReesterRecordApx.Controls.IndexOf(this.payReesterRecordApxView));
                 this.payReesterRecordApxView.set_Enabled(true);
                 this.payReesterRecordApxView.set_Visible(true);
                 this.payReesterRecordApxView.Fill(payReesterRecord);
                 this.tabReesterRecordApx.ResumeLayout();
                 return;
             }
             goto Label_0192;
         }
         this.tabReesterRecordApx.SuspendLayout();
         this.tabReesterRecordApx.set_TabIndex(this.tabReesterRecordApx.Controls.IndexOf(this.notePayRelationsView));
         this.notePayRelationsView.set_Enabled(true);
         this.notePayRelationsView.set_Visible(true);
         this.notePayRelationsView.Fill(payReesterRecord);
         this.tabReesterRecordApx.ResumeLayout();
     }
     return;
     Label_0192:
     throw new System.ApplicationException("Неизвестный формат хранения записи реестра.");
 }
Exemplo n.º 3
0
 public void Fill(PayReesterRecord payReesterRecord, string groupName)
 {
     if (this.mPayReesterReesterRecord != payReesterRecord)
     {
         this.mPayReesterReesterRecord = payReesterRecord;
         this.mGroupName = groupName;
         this.UpdateView();
     }
 }
 public void Fill(PayReesterRecord payReesterRecord)
 {
     this.btnSave.set_Visible(true);
     if (this.mPayReesterReesterRecord != payReesterRecord)
     {
         this.mPayReesterReesterRecord = payReesterRecord;
         this.m_IsProcessed = (bool) (this.mPayReesterReesterRecord.StatusName == "Обработан");
         this.UpdateView();
     }
 }
Exemplo n.º 5
0
 public void Fill(PayReesterRecord payReesterRecord)
 {
     this.bsApx.set_DataSource(null);
     if (payReesterRecord != PayReesterRecord.Null)
     {
         bool flag = (bool) (payReesterRecord.StatusName == "Обработан");
         this.toolStrip1.set_Visible(!flag);
         this.columnValueDataGridViewTextBoxColumn.set_ReadOnly(flag);
         this.m_PayReesterRecord = payReesterRecord;
         this.bsApx.set_DataSource(this.m_PayReesterRecord.GetUnpivotApx());
     }
 }
Exemplo n.º 6
0
 public void Fill(PayReesterRecord payReesterRecord)
 {
     if (payReesterRecord.PaymentSystemName != "Система \"Город\"")
     {
         base.set_Enabled(false);
         if (this.m_Notes != null)
         {
             this.m_Notes.Clear();
         }
     }
     else
     {
         base.set_Enabled(true);
         if (this.mPayReesterReesterRecord != payReesterRecord)
         {
             this.mPayReesterReesterRecord = payReesterRecord;
             this.UpdateView();
         }
     }
 }
Exemplo n.º 7
0
 private void FillRecordApxView(PayReesterRecord payReesterRecord)
 {
     this.UnvisibleReesterRecordApxViews();
     if (payReesterRecord != PayReesterRecord.Null)
     {
         try
         {
             FasetItem recordStorageFormat = payReesterRecord.GetReester().GetPaymentSystem().GetRecordStorageFormat();
             if (recordStorageFormat.Name == "Значения через запятую")
             {
                 this.tabReesterRecordApx.SuspendLayout();
                 this.tabReesterRecordApx.set_TabIndex(this.tabReesterRecordApx.Controls.IndexOf(this.notePayRelationsView));
                 this.notePayRelationsView.set_Enabled(true);
                 this.notePayRelationsView.set_Visible(true);
                 this.notePayRelationsView.Fill(payReesterRecord);
                 this.tabReesterRecordApx.ResumeLayout();
             }
             if (recordStorageFormat.Name == "\"Поле=Значение\" через точку с запятой")
             {
                 this.tabReesterRecordApx.SuspendLayout();
                 this.tabReesterRecordApx.set_TabIndex(this.tabReesterRecordApx.Controls.IndexOf(this.payReesterRecordApxView));
                 this.payReesterRecordApxView.set_Enabled(true);
                 this.payReesterRecordApxView.set_Visible(true);
                 this.payReesterRecordApxView.Fill(payReesterRecord);
                 this.tabReesterRecordApx.ResumeLayout();
             }
         }
         catch (System.Exception)
         {
             Messages.ShowMessage("Не найден формат хранения записи реестра для платежной системы");
         }
     }
 }
Exemplo n.º 8
0
 private void RefreshTabControl(PayReesterRecord payReesterRecord)
 {
     base.SuspendLayout();
     this.tabAccountServices.set_Visible((bool) (payReesterRecord.StatusName != "Обработан"));
     if (this.tab.SelectedTab == this.tabPaymentRelations)
     {
         this.paymentPayRelationsView.Fill(payReesterRecord, "Оплата (интерфейс реестров)");
     }
     if (this.tab.SelectedTab == this.tabChargeRelations)
     {
         this.chargePayRelationsView.Fill(payReesterRecord, "Начисление (интерфейс реестров)");
     }
     if (this.tab.SelectedTab == this.tabIndicationRelations)
     {
         this.counterIndicationPayRelationsView.Fill(payReesterRecord);
     }
     if ((this.tab.SelectedTab == this.tabAccountServices) && (payReesterRecord.StatusName != "Обработан"))
     {
         this.accountServicesDecomposeView.Fill(payReesterRecord);
     }
     if (this.tab.SelectedTab == this.tabReesterRecordApx)
     {
         this.FillRecordApxView(payReesterRecord);
     }
     base.ResumeLayout();
 }
Exemplo n.º 9
0
 private void payReesterRecordsView_CurrentChanged(PayReesterRecord payReesterRecord)
 {
     this.RefreshTabControl(payReesterRecord);
 }
Exemplo n.º 10
0
 public void Clear()
 {
     this.mPayReesterReesterRecord = PayReesterRecord.Null;
     this.bsAccountServices.Clear();
     this.UpdateView();
 }
Exemplo n.º 11
0
 public void Clear()
 {
     this.mPayReesterReesterRecord = PayReesterRecord.Null;
     this.UpdateView();
 }
Exemplo n.º 12
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();
         }
     }
 }