Exemplo n.º 1
0
 public void Selected(OrgDocument orgDocument)
 {
     this.SelectedOrgDocument = orgDocument;
     if (this.OnOrgDocumentSelected != null)
     {
         this.OnOrgDocumentSelected(orgDocument);
     }
 }
Exemplo n.º 2
0
 protected override void ClearText(object sender, System.EventArgs e)
 {
     this.SelectedOrgDocument = null;
     if (this.OnOrgDocumentSelected != null)
     {
         this.OnOrgDocumentSelected(null);
     }
 }
Exemplo n.º 3
0
 public RemitteeServiceAddForm()
 {
     this.organization = new Organization();
     this.doc = new OrgDocument();
     this.m_serviceOld = new ServiceOld();
     this.InitializeComponent();
     base.get_DesignMode();
 }
Exemplo n.º 4
0
 public OrgDocumentsForm(OrgDocument doc, OrgDocumentHandler handler)
 {
     this.InitializeComponent();
     this.handler = handler;
     System.Collections.Generic.List<OrgDocument> list = new System.Collections.Generic.List<OrgDocument>();
     if (doc != null)
     {
         list.Add(doc);
     }
     for (int i = (int) (Register.OrgDocumentsCache.get_Count() - 1); i >= 0; i = (int) (i - 1))
     {
         if ((doc == null) || (doc.Id != Register.OrgDocumentsCache.get_Item(i).Id))
         {
             list.Add(Register.OrgDocumentsCache.get_Item(i));
         }
     }
     this.orgDocumentBindingSource.set_DataSource(list);
 }
Exemplo n.º 5
0
 public PenaltyTransferForm(GroupOperation sourceGroupOperation, OrgDocument doc)
 {
     this.InitializeComponent();
     this.btnTransfer.set_Enabled(true);
     if ((sourceGroupOperation == null) || (sourceGroupOperation == GroupOperation.Null))
     {
         Messages.ShowError("Ошибка: не задана групповая операция - источник!");
         base.set_DialogResult(System.Windows.Forms.DialogResult.Abort);
         base.Close();
     }
     else
     {
         this.m_SourceGroupOperation = sourceGroupOperation;
         this.bsJn.set_DataSource(this.m_SourceGroupOperation.GetJnPenaltyServices());
         this.UpdateTotalSummView();
         if ((doc != null) && (doc != OrgDocument.Null))
         {
             this.selectOrgDocument.SelectedOrgDocument = doc;
         }
     }
 }
Exemplo n.º 6
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     OrgDocument owid = new OrgDocument();
     OrgDocumentDTO searchDTO = (OrgDocumentDTO) this.orgDocumentView.GetSearchDTO();
     owid.Id = -1L;
     owid.Number = searchDTO.Number;
     owid.Organization = searchDTO.Organization;
     owid.Type = searchDTO.Type;
     owid.WhenGet = searchDTO.WhenGet;
     owid.FromDate = searchDTO.FromDate;
     owid.ToDate = searchDTO.ToDate;
     CollectionForm form = new CollectionForm(owid, "Добавить новый документ", new OrgDocumentView());
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         this.orgDocumentBindingSource.Add(form.SelectedObject);
         this.orgDocumentBindingSource.set_Position(this.orgDocumentBindingSource.IndexOf(form.SelectedObject));
     }
 }
Exemplo n.º 7
0
 public CashReturnForm(GroupOperation sourceGroupOperation, Account localAccount, OrgDocument doc)
 {
     this.m_account = localAccount;
     this.InitializeComponent();
     if ((sourceGroupOperation == null) || (sourceGroupOperation == GroupOperation.Null))
     {
         Messages.ShowError("Ошибка: не задана групповая операция - источник!");
         base.set_DialogResult(System.Windows.Forms.DialogResult.Abort);
         base.Close();
     }
     else
     {
         this.m_SourceGroupOperation = sourceGroupOperation;
         this.UpdatePaymentSourceGridView();
         if ((doc != null) && (doc != OrgDocument.Null))
         {
             this.selectOrgDocument.SelectedOrgDocument = doc;
         }
     }
 }
Exemplo n.º 8
0
 public static void TransferAvanceAccountServices(ObjectList<ServiceOld> sourceServices, ObjectList<ServiceOld> destServices, OrgDocument doc, ObjectList<LocalAddress> addresses, bool avanceTransfer, bool debtTransfer, bool useCloseServices, bool useAccountServiceBankrupts, bool useSpreadRatio, System.Collections.Generic.IDictionary<ServiceOld, decimal> servicesWithSpreadRatio, int debtTransferType, int avanceTransferType)
 {
     Mappers.GroupOperationMapper.TransferAvanceAccountServices(sourceServices, destServices, doc, addresses, avanceTransfer, debtTransfer, useCloseServices, useAccountServiceBankrupts, useSpreadRatio, servicesWithSpreadRatio, debtTransferType, avanceTransferType);
 }
Exemplo n.º 9
0
 public static void RecalcAccountServices(ObjectList<ServiceOld> services, int subTypeId, System.DateTime fromDate, System.DateTime toDate, OrgDocument doc, Area area, bool useAccountServiceBankrupts, bool isRecalc)
 {
     Mappers.GroupOperationMapper.RecalcAccountServices(services, subTypeId, fromDate, toDate, doc, area, useAccountServiceBankrupts, isRecalc);
 }
 public virtual void Save(OrgDocument doc, int unitId, int? byUnitId, decimal startValue, decimal endValue, System.DateTime normDate)
 {
     this.dgvAccountServiceNorm.EndEdit();
     if ((this.mServiceType == null) || (this.mServiceType == ServiceType.Null))
     {
         throw new System.ApplicationException("Тип услуги не задан");
     }
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvAccountServiceNorm.Rows)
     {
         AccountServiceTariffNormView view = row.get_DataBoundItem() as AccountServiceTariffNormView;
         decimal rate = 0M;
         if (decimal.TryParse((string) (row.Cells.get_Item("NewNorm").get_Value() as string), ref rate))
         {
             view.AddNorm(this.mServiceType, rate, doc, normDate, unitId, byUnitId, startValue, endValue, view.AccountServiceId);
         }
     }
     if (this.dgvAccountServiceNorm.SelectedRows.get_Count() > 0)
     {
         foreach (System.Windows.Forms.DataGridViewRow row2 in this.dgvAccountServiceNorm.SelectedRows)
         {
             AccountServiceTariffNormView view2 = this.dgvAccountServiceNorm.Rows.get_Item(row2.get_Index()).get_DataBoundItem() as AccountServiceTariffNormView;
             if ((view2 != null) && (view2.TariffId != AccountServiceTariff.Null.Id))
             {
                 this.dgvAccountServiceNorm.Rows.get_Item(row2.get_Index()).Cells.get_Item("NewNorm");
             }
         }
     }
 }
Exemplo n.º 11
0
 public void AddTariff(ServiceType serviceType, decimal rate, OrgDocument doc, System.DateTime date, long accountServiceId, System.DateTime toDate)
 {
     Mappers.AccountServiceTariffNormMapper.AddTariff(this, serviceType, rate, doc, date, accountServiceId, toDate);
 }
Exemplo n.º 12
0
 public System.Data.DataSet Recalc(System.DateTime fromDate, System.DateTime toDate, System.DateTime fromPeriod, System.DateTime toPeriod, FasetItem subType, Organization provider, ServiceTypeOld serviceType, ServiceOld serviceOld, Organization houseHolder, OrgDocument orgDocument, ObjectList<LocalAddress> addresses)
 {
     System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[12];
     parameters[0] = new System.Data.SqlClient.SqlParameter("@areaId", System.Data.SqlDbType.BigInt);
     parameters[0].set_Value((long) Area.GetAreaIdByLocalAddresses(addresses));
     parameters[1] = new System.Data.SqlClient.SqlParameter("@fromDate", System.Data.SqlDbType.DateTime);
     parameters[1].set_Value(fromDate);
     parameters[2] = new System.Data.SqlClient.SqlParameter("@toDate", System.Data.SqlDbType.DateTime);
     parameters[2].set_Value((toDate == Constants.NullDate) ? ((object) System.DBNull.Value) : ((object) toDate));
     parameters[3] = new System.Data.SqlClient.SqlParameter("@fromPeriod", System.Data.SqlDbType.DateTime);
     parameters[3].set_Value(fromPeriod);
     parameters[4] = new System.Data.SqlClient.SqlParameter("@toPeriod", System.Data.SqlDbType.DateTime);
     parameters[4].set_Value((toPeriod == Constants.NullDate) ? ((object) System.DBNull.Value) : ((object) toPeriod));
     parameters[5] = new System.Data.SqlClient.SqlParameter("@subTypeId", System.Data.SqlDbType.BigInt);
     parameters[5].set_Value((subType == FasetItem.Null) ? ((object) System.DBNull.Value) : ((object) ((int) subType.Id)));
     parameters[6] = new System.Data.SqlClient.SqlParameter("@providerId", System.Data.SqlDbType.BigInt);
     parameters[6].set_Value((provider == Organization.Null) ? ((object) System.DBNull.Value) : ((object) ((long) provider.Id)));
     parameters[7] = new System.Data.SqlClient.SqlParameter("@serviceTypeId", System.Data.SqlDbType.BigInt);
     parameters[7].set_Value((serviceType == ServiceTypeOld.Null) ? ((object) System.DBNull.Value) : ((object) ((long) serviceType.Id)));
     parameters[8] = new System.Data.SqlClient.SqlParameter("@serviceId", System.Data.SqlDbType.BigInt);
     parameters[8].set_Value((serviceOld == ServiceOld.Null) ? ((object) System.DBNull.Value) : ((object) ((long) serviceOld.Id)));
     parameters[9] = new System.Data.SqlClient.SqlParameter("@houseHolderId", System.Data.SqlDbType.BigInt);
     parameters[9].set_Value((houseHolder == Organization.Null) ? ((object) System.DBNull.Value) : ((object) ((long) houseHolder.Id)));
     parameters[10] = new System.Data.SqlClient.SqlParameter("@orgDocumentId", System.Data.SqlDbType.BigInt);
     parameters[10].set_Value((orgDocument == OrgDocument.Null) ? ((object) System.DBNull.Value) : ((object) ((long) orgDocument.Id)));
     parameters[11] = new System.Data.SqlClient.SqlParameter("@summ", System.Data.SqlDbType.Decimal);
     parameters[11].set_Direction(System.Data.ParameterDirection.Output);
     System.Data.DataSet set = new System.Data.DataSet();
     set.Tables.Add(DALSql.ExecuteDataTable("exec sn.GetJnRecalcReport  @areaId,@fromDate,@toDate,@fromPeriod,@toPeriod,\r\n\t\t\t\t\t\t\t\t\t\t\t\t@subTypeId,@providerId,@serviceTypeId,@serviceId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t@houseHolderId,@orgDocumentId,@summ output ", parameters));
     set.Tables.Add(DALSql.ExecuteDataTable("select sn.User_GetName() userName", null));
     return set;
 }
Exemplo n.º 13
0
 public static void OpenAccountService(long openServiceId, System.DateTime openDate, System.DateTime closeDate, OrgDocument doc, FasetItem apartmentType, ObjectList<LocalAddress> addresses, long houseHolderId, long accountHouseHolderId, bool openInCloseAccount)
 {
     Mappers.GroupOperationMapper.OpenAccountService(openServiceId, openDate, closeDate, doc, apartmentType, addresses, houseHolderId, accountHouseHolderId, openInCloseAccount);
 }
Exemplo n.º 14
0
 public void Transfer(Account targetAccount, OrgDocument orgDoc, System.Data.DataTable tSource, System.Data.DataTable tDest, System.DateTime transferDate)
 {
     Mappers.GroupOperationMapper.Transfer(base.Id, targetAccount.Id, new long?((orgDoc == null) ? ((long) 0L) : orgDoc.Id), tSource, tDest, transferDate);
 }
Exemplo n.º 15
0
 public void TransferPenalty(OrgDocument orgDoc, System.Data.DataTable dtSource)
 {
     Mappers.GroupOperationMapper.TransferPenalty(base.Id, new long?((orgDoc == null) ? ((long) 0L) : orgDoc.Id), dtSource);
 }
Exemplo n.º 16
0
 public void Return(OrgDocument orgDoc, System.Data.DataTable tSource, System.DateTime returnDate)
 {
     Mappers.GroupOperationMapper.Return(base.Id, new long?((orgDoc == null) ? ((long) 0L) : orgDoc.Id), tSource, returnDate);
 }
Exemplo n.º 17
0
 public static void TransferAvanceAccountServicesByServiceTypesUseOpenAccountService(Area area, OrgDocument doc, ServiceTypeOld sourceServiceType, ServiceTypeOld destServiceType, bool isAvanceTransverFull, int debtTransferType, int avanceTransferType)
 {
     Mappers.GroupOperationMapper.TransferAvanceAccountServicesByServiceTypesUseOpenAccountService(area.Id, doc.Id, sourceServiceType.Id, destServiceType.Id, isAvanceTransverFull, debtTransferType, avanceTransferType);
 }
Exemplo n.º 18
0
 public static void TransferAvanceAccountServicesByServiceTypes(Area area, OrgDocument doc, bool avanceTransfer, bool debtTransfer, ServiceTypeOld sourceServiceType, ServiceTypeOld destServiceType, bool useAccountServiceBankrupts, int debtTransferType, int avanceTransferType)
 {
     Mappers.GroupOperationMapper.TransferAvanceAccountServicesByServiceTypes(area.Id, doc.Id, avanceTransfer, debtTransfer, sourceServiceType.Id, destServiceType.Id, useAccountServiceBankrupts, debtTransferType, avanceTransferType);
 }
 public virtual void Save(OrgDocument doc, System.DateTime tariffDate, System.DateTime tariffToDate)
 {
     this.dgvAccountServiceTariff.EndEdit();
     if ((this.mServiceType == null) || (this.mServiceType == ServiceType.Null))
     {
         throw new System.ApplicationException("Тип услуги не задан");
     }
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvAccountServiceTariff.Rows)
     {
         decimal num;
         AccountServiceTariffNormView view = row.get_DataBoundItem() as AccountServiceTariffNormView;
         if (decimal.TryParse((string) (row.Cells.get_Item("dataGridViewTextBoxColumn3").get_Value() as string), ref num))
         {
             view.AddTariff(this.mServiceType, num, doc, tariffDate, view.AccountServiceId, tariffToDate);
         }
     }
     if (this.dgvAccountServiceTariff.SelectedRows.get_Count() > 0)
     {
         foreach (System.Windows.Forms.DataGridViewRow row2 in this.dgvAccountServiceTariff.SelectedRows)
         {
             AccountServiceTariffNormView view2 = this.dgvAccountServiceTariff.Rows.get_Item(row2.get_Index()).get_DataBoundItem() as AccountServiceTariffNormView;
             if ((view2 != null) && (view2.TariffId != AccountServiceTariff.Null.Id))
             {
                 this.dgvAccountServiceTariff.Rows.get_Item(row2.get_Index()).Cells.get_Item("dataGridViewTextBoxColumn3");
             }
         }
     }
 }
Exemplo n.º 20
0
 private void btnDelete_Click(object sender, System.EventArgs e)
 {
     Remittee remittee = (Remittee) this.bsRemittee.get_Current();
     if (remittee == null)
     {
         Messages.ShowWarning("Выберите получателя!");
     }
     else if (RemitteeService.FindByRemitteeId(remittee).get_Count() != 0)
     {
         Messages.ShowWarning("Невозможно удалить запись: к ней привязаны услуги.");
     }
     else if (System.Windows.Forms.MessageBox.Show("Вы уверены, что хотите удалить запись?", "Удаление", System.Windows.Forms.MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.No)
     {
         remittee.Delete();
         if (this.selectOrganization.SelectedOrganizationOld == null)
         {
             this.organization = Organization.Null;
         }
         else
         {
             this.organization = this.selectOrganization.SelectedOrganizationOld;
         }
         if (this.selectOrgDocument.SelectedOrgDocument == null)
         {
             this.doc = OrgDocument.Null;
         }
         else
         {
             this.doc = this.selectOrgDocument.SelectedOrgDocument;
         }
         this.bsRemittee.set_DataSource(Remittee.FindByOrgAndDoc(this.organization, this.doc));
     }
 }
Exemplo n.º 21
0
 public static void PenaltyRemissionAccountServices(long serviceId, System.DateTime fromDate, System.DateTime toDate, OrgDocument doc, ObjectList<LocalAddress> addresses, bool close, bool open)
 {
     Mappers.GroupOperationMapper.PenaltyRemissionAccountServices(serviceId, fromDate, toDate, doc, addresses, close, open);
 }
Exemplo n.º 22
0
 private void selectOrgDocument_OnOrgDocumentSelected(OrgDocument orgDocument)
 {
     this.btnSave.set_Enabled(this.ValidateSavingOptions());
 }
Exemplo n.º 23
0
 private void OrgDocEditingControl_OnOrgDocumentSelected(OrgDocument orgDocument)
 {
     this.OnValueChanged(System.EventArgs.Empty);
 }
Exemplo n.º 24
0
 public static void CloseOpenAccountService(long closeServiceId, long openServiceId, System.DateTime closeDate, System.DateTime openDate, bool avanceTransfer, bool debtTransfer, OrgDocument doc, ObjectList<LocalAddress> addresses, long houseHolderId, long accountHouseHolderId, bool isRecalc, bool opServicesTransfer, bool connectionCounter, bool connectionEquipment, bool accountServiceTariff, bool accountServiceNorm, int debtTransferType, int avanceTransferType)
 {
     Mappers.GroupOperationMapper.CloseOpenAccountService(closeServiceId, openServiceId, closeDate, openDate, avanceTransfer, debtTransfer, doc, addresses, houseHolderId, accountHouseHolderId, isRecalc, opServicesTransfer, connectionCounter, connectionEquipment, accountServiceTariff, accountServiceNorm, debtTransferType, avanceTransferType);
 }
Exemplo n.º 25
0
 public void AddNorm(ServiceType serviceType, decimal rate, OrgDocument doc, System.DateTime normDate, int unitId, int? byUnitId, decimal startValue, decimal endValue, long accountServiceId)
 {
     Mappers.AccountServiceTariffNormMapper.AddNorm(this, serviceType, rate, doc, normDate, unitId, byUnitId, startValue, endValue, accountServiceId);
 }
Exemplo n.º 26
0
 public OrgDocument AddOrgDocument(OrgDocumentDTO dto)
 {
     OrgDocument document = new OrgDocument();
     document.SaveChanges(dto);
     return document;
 }
Exemplo n.º 27
0
 private void btnSearch_Click(object sender, System.EventArgs e)
 {
     if (this.selectOrganization.SelectedOrganizationOld == null)
     {
         this.organization = Organization.Null;
     }
     else
     {
         this.organization = this.selectOrganization.SelectedOrganizationOld;
     }
     if (this.selectOrgDocument.SelectedOrgDocument == null)
     {
         this.doc = OrgDocument.Null;
     }
     else
     {
         this.doc = this.selectOrgDocument.SelectedOrgDocument;
     }
     this.bsRemittee.set_DataSource(Remittee.FindByOrgAndDoc(this.organization, this.doc));
 }
Exemplo n.º 28
0
 public static void SuspensionAccountServices(ObjectList<ServiceOld> services, System.DateTime fromDate, System.DateTime toDate, decimal percentTakingOff, int typeSuspensionId, int subTypeId, string comment, OrgDocument doc, ObjectList<LocalAddress> addresses)
 {
     Mappers.GroupOperationMapper.SuspensionAccountServices(services, fromDate, toDate, percentTakingOff, typeSuspensionId, subTypeId, comment, doc, addresses);
 }
Exemplo n.º 29
0
 public virtual void SaveTariffs(OrgDocument doc, System.DateTime tariffDate)
 {
     this.dgvHouseServiceTariffs.EndEdit();
     this.dgvHouseServiceTariffTypes.EndEdit();
     if ((this.mServiceType == null) || (this.mServiceType == ServiceType.Null))
     {
         throw new System.ApplicationException("Тип услуги не задан");
     }
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvHouseServiceTariffs.Rows)
     {
         decimal num;
         if (decimal.TryParse((string) (row.Cells.get_Item("NewRate").get_Value() as string), ref num))
         {
             (row.get_DataBoundItem() as HouseWithServiceTariff).AddTariff(this.mServiceType, num, doc, tariffDate, this.mService);
         }
     }
     if (this.dgvHouseServiceTariffs.SelectedRows.get_Count() > 1)
     {
         foreach (System.Windows.Forms.DataGridViewRow row2 in this.dgvHouseServiceTariffs.SelectedRows)
         {
             foreach (System.Windows.Forms.DataGridViewRow row3 in (System.Collections.IEnumerable) this.dgvHouseServiceTariffTypes.Rows)
             {
                 HouseWithServiceTariff house = this.dgvHouseServiceTariffs.Rows.get_Item(row2.get_Index()).get_DataBoundItem() as HouseWithServiceTariff;
                 if ((house == null) || (house.TariffId == HouseServiceTariff.Null.Id))
                 {
                     return;
                 }
                 this.EditTariffTypeRow(row3, house);
             }
         }
     }
     else
     {
         HouseWithServiceTariff tariff3 = this.bsHouseWithServiceTariffs.get_Current() as HouseWithServiceTariff;
         if ((tariff3 != null) && (tariff3.TariffId != HouseServiceTariff.Null.Id))
         {
             foreach (System.Windows.Forms.DataGridViewRow row4 in (System.Collections.IEnumerable) this.dgvHouseServiceTariffTypes.Rows)
             {
                 this.EditTariffTypeRow(row4, tariff3);
             }
         }
     }
 }
Exemplo n.º 30
0
 public static void CloseAccountService(long closeServiceId, System.DateTime closeDate, long serviceTypeId, long houseHolderId, long accountHouseHolderId, OrgDocument doc, bool avanceTransfer, bool debtTransfer, bool cancelDebt, ObjectList<LocalAddress> addresses)
 {
     Mappers.GroupOperationMapper.CloseAccountService(closeServiceId, closeDate, serviceTypeId, houseHolderId, accountHouseHolderId, doc, avanceTransfer, debtTransfer, cancelDebt, addresses);
 }