コード例 #1
0
ファイル: OrganizationView.cs プロジェクト: u4097/SQLScript
 public DataTransferObject GetSearchDTO()
 {
     OrganizationDTO ndto;
     ndto = new OrganizationDTO {
         Parent = (Organization) this.orgListBindingSource.get_Current(),
         ParentId = ndto.Parent.Id,
         Code = this.m_CodeValue,
         ShortName = this.m_ShortName.get_Text().Trim()
     };
     if ((ndto.ShortName.get_Length() > 0) && !ndto.ShortName.Contains("%"))
     {
         ndto.ShortName = "%" + ndto.ShortName + "%";
     }
     ndto.LongName = this.m_LongName.get_Text().Trim();
     if ((ndto.LongName.get_Length() > 0) && !ndto.LongName.Contains("%"))
     {
         ndto.LongName = "%" + ndto.LongName + "%";
     }
     ndto.INN = this.m_INN.get_Text();
     if ((ndto.INN.get_Length() > 0) && !ndto.INN.Contains("%"))
     {
         ndto.INN = "%" + ndto.INN + "%";
     }
     ndto.IsServiceProvider = this.m_IsServiceProvider.get_Checked();
     ndto.IsHouseHolder = this.m_IsHouseHolder.get_Checked();
     ndto.IsCashlessTransferrer = this.m_IsCashlessTransferrer.get_Checked();
     ndto.IsBenefitTransferrer = this.m_IsBenefitTransferrer.get_Checked();
     ndto.IsFlatOwner = this.m_IsFlatOwner.get_Checked();
     ndto.IsPaymentAgent = this.m_IsPaymentAgent.get_Checked();
     ndto.IsResourceProvider = this.m_isResourceProvider.get_Checked();
     ndto.IsContractEnded = this.m_IsContractEnded.get_Checked();
     ndto.FromDate = this.m_DatePeriod.DateBegin;
     ndto.ToDate = this.m_DatePeriod.DateEnd;
     ndto.INFO = this.m_Info.get_Text().Trim();
     ndto.DistribudePaymentType = this.selectDistributePayment.SelectedFasetItem.Id;
     if ((ndto.INFO.get_Length() > 0) && !ndto.INFO.Contains("%"))
     {
         ndto.INFO = "%" + ndto.INFO + "%";
     }
     ndto.AddrInfo = this.m_AddrInfo.get_Text().Trim();
     if ((ndto.AddrInfo.get_Length() > 0) && !ndto.AddrInfo.Contains("%"))
     {
         ndto.AddrInfo = "%" + ndto.AddrInfo + "%";
     }
     ndto.Parent.AddrName = this.m_Address.get_Text().Trim();
     ndto.Parent.ModeWork = this.m_ModeWk.get_Text().Trim();
     ndto.Parent.Manager = this.m_Manager.get_Text().Trim();
     ndto.Parent.ManagerPosition = this.m_ManagerPosition.get_Text().Trim();
     ndto.Parent.Telephone = this.m_Phone.get_Text().Trim();
     ndto.Parent.Fax = this.m_Fax.get_Text().Trim();
     ndto.Parent.IsBankrupt = this.m_IsBankrupt.get_Checked();
     ndto.Parent.TelephoneEmergencyDispatchService = this.m_TelephoneEmergencyDispatchService.get_Text().Trim();
     ndto.IsPaymentUseNotice = this.m_IsPaymentUseNotice.get_Checked();
     ndto.IsPaymentUseNegativeSumm = this.m_IsPaymentUseNegativeSumm.get_Checked();
     return ndto;
 }
コード例 #2
0
ファイル: ChiefMainForm.cs プロジェクト: u4097/SQLScript
 private void btnShowServiceProviders_Click(object sender, System.EventArgs e)
 {
     OrganizationDTO dto = new OrganizationDTO {
         Parent = Organization.Null,
         ShortName = string.Empty,
         LongName = string.Empty,
         INN = string.Empty,
         KPP = string.Empty,
         OGRN = string.Empty,
         FromDate = Constants.MinDate,
         ToDate = Constants.MaxDate,
         IsServiceProvider = true
     };
     ObjectList<Organization> orgs = Mappers.Search<Organization>(dto);
     this.serviceProviderTree.ShowOrganizations(orgs);
 }