コード例 #1
0
ファイル: Journal.cs プロジェクト: kiquenet/B4F
 public Journal(JournalTypes journalType, string journalNumber, IManagementCompany managementCompany, ICurrency currency)
 {
     this.JournalType = journalType;
     this.JournalNumber = journalNumber;
     this.ManagementCompany = managementCompany;
     this.currency = Currency;
 }
コード例 #2
0
ファイル: CustomerAccount.cs プロジェクト: kiquenet/B4F
 /// <summary>
 /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.CustomerAccount">CustomerAccount</see> class.
 /// </summary>
 /// <param name="number">The Account's number</param>
 /// <param name="shortName">Shortname of the account</param>
 /// <param name="accountOwner">The owner of the account</param>
 /// <param name="modelPortfolio">The model portfolio the account is tied to</param>
 public CustomerAccount(string number, string shortName, IManagementCompany accountOwner, IPortfolioModel modelPortfolio, DateTime creationDate)
     : base(number, shortName, accountOwner, modelPortfolio)
 {
     this.CreationDate = creationDate;
     this.Status = AccountStati.Active;
     this.LastDateStatusChanged = creationDate;
     this.TradeableStatus = Tradeability.NonTradeable;
     this.UseManagementFee = true;
     this.DateTradeabilityStatusChanged = creationDate;
 }
コード例 #3
0
ファイル: CounterAccount.cs プロジェクト: kiquenet/B4F
        public CounterAccount(string number, string accountName, IBank bank, string bankName, Address bankAddress,
            IManagementCompany managementCompany, bool isPublic, Address beneficiaryAddress, bool ByPassValidation)
        {
            this.Number = number;
            this.AccountName = accountName;
            this.Bank = bank;
            this.BankName = bankName;
            this.BankAddress = bankAddress;
            this.ManagementCompany = managementCompany;
            this.IsPublic = isPublic;
            this.BeneficiaryAddress = beneficiaryAddress;

            if (!ByPassValidation && !IsValid)
                throw new ApplicationException("This Counter Account is not valid.");
        }
コード例 #4
0
ファイル: ReportTemplateMapper.cs プロジェクト: kiquenet/B4F
        public static IReportTemplate GetReportTemplate(
            IDalSession session, IManagementCompany managementCompany, string reportName, bool throwException)
        {
            List<ICriterion> expressions = new List<ICriterion>();
            expressions.Add(Expression.Eq("ManagementCompany.Key", managementCompany.Key));
            expressions.Add(Expression.Eq("ReportName", reportName));
            IList result = session.GetList(typeof(ReportTemplate), expressions);

            if ((result != null) && (result.Count > 0))
                return (IReportTemplate)result[0];
            else if (throwException)
                throw new ApplicationException(string.Format(
                    "Could not find report template name for management company '{0}' and report '{1}'.",
                    managementCompany.CompanyName, reportName));
            else
                return null;
        }
コード例 #5
0
ファイル: JobHistoryMapper.cs プロジェクト: kiquenet/B4F
        public static IList GetJobHistoryDetails(IDalSession session, IManagementCompany company, string jobName, string componentName, DateTime startDate, DateTime endDate)
        {
            Hashtable parameters = new Hashtable();
            string hql = "";

            if (company == null)
                throw new ApplicationException("The current company can not be null");
            else
            {
                if (!company.IsStichting)
                    hql = " where IsNull(J.ManagementCompanyID, 0) in (0," + company.Key.ToString() + ")";
            }

            if (endDate != DateTime.MinValue)
                endDate = endDate.AddDays(1).Date;

            if (jobName + string.Empty != string.Empty)
                hql = (hql == "" ? " where " : " and ") + "J.Job like '%" + jobName + "%'";

            if (componentName + string.Empty != string.Empty)
                hql += (hql == "" ? " where " : " and ") + "J.JobComponent like '%" + componentName + "%'";

            if (startDate != DateTime.MinValue && endDate != DateTime.MinValue)
            {
                parameters.Add("StartTime", startDate);
                parameters.Add("EndTime", endDate);
                hql += (hql == "" ? " where " : " and ") + "J.StartTime between :StartTime and :EndTime";
            }
            else
            {
                if (startDate != DateTime.MinValue)
                {
                    hql += (hql == "" ? " where " : " and ") + "J.StartTime >= :StartTime";
                    parameters.Add("StartTime", startDate);
                }

                if (endDate != DateTime.MinValue)
                {
                    hql += (hql == "" ? " where " : " and ") + "J.StartTime <= :EndTime";
                    parameters.Add("EndTime", endDate);
                }
            }

            hql = "from JobHistory J " + hql;
            return session.GetListByHQL(hql, parameters);
        }
コード例 #6
0
ファイル: ImportAccountsAdapter.cs プロジェクト: kiquenet/B4F
        private static ICompanyContactPerson CreateCompanyContactPerson(IDalSession session,
                                                        IContactCompany company,
                                                        string BurgerServiceNummer,
                                                        string Voorletters,
                                                        string Tussenvoegsels,
                                                        string Naam,
                                                        Address PostalAddress,
                                                        Address ResidentialAddress,
                                                        IContactDetails ContactDetails,
                                                        Gender ContactGender,
                                                        INationality ContactNationality,
                                                        IIdentification Id,
                                                        DateTime Dob,
                                                        IManagementCompany AssetManager,
                                                        DateTime creationdate)
        {
            ICompanyContactPerson cmpcp = null;
            IContactPerson contact = null;

            if (company != null && !string.IsNullOrEmpty(Naam))
            {
                if (!LookupContactPersonByBSN(session, BurgerServiceNummer, out contact))
                {
                    contact = new ContactPerson(Voorletters,
                                                    Tussenvoegsels,
                                                    ContactGender,
                                                    ContactNationality,
                                                    Naam,
                                                    PostalAddress,
                                                    ResidentialAddress,
                                                    ContactDetails);
                    contact.BurgerServiceNummer = BurgerServiceNummer;
                    contact.AssetManager = (IAssetManager)AssetManager;
                    contact.Identification = Id;
                    contact.DateOfBirth = Dob;
                    contact.CreationDate = creationdate;
                }
                cmpcp = new CompanyContactPerson(contact, company);
            }
            return cmpcp;
        }
コード例 #7
0
 /// <summary>
 /// Updates a ManagementCompany
 /// </summary>
 /// <param name="session">An instance of the Data Access Library <see cref="T:B4F.TotalGiro.DAL.NHSession">NHSession</see> class</param>
 /// <param name="list">The ManagementCompany</param>
 public static void Update(IDalSession session, IManagementCompany obj)
 {
     session.Update(obj);
 }
コード例 #8
0
ファイル: CounterAccount.cs プロジェクト: kiquenet/B4F
 public CounterAccount(string number, string accountName, IBank bank, string bankName, Address bankAddress,
         IManagementCompany managementCompany, bool isPublic, Address beneficiaryAddress)
     : this(number, accountName, bank, bankName, bankAddress, managementCompany, isPublic, beneficiaryAddress, false)
 {
 }
コード例 #9
0
ファイル: AccountTypeSystem.cs プロジェクト: kiquenet/B4F
 /// <summary>
 /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.AccountTypeSystem">AccountTypeSystem</see> class.
 /// </summary>
 /// <param name="number">The Account's number</param>
 /// <param name="shortName">Shortname of the account</param>
 /// <param name="accountOwner">The owner of the account</param>
 public AccountTypeSystem(string number, string shortName, IManagementCompany accountOwner)
     : base(number, shortName, accountOwner)
 {
 }
コード例 #10
0
ファイル: ImportAccountsAdapter.cs プロジェクト: kiquenet/B4F
        private static IContactPerson CreateContactPerson(IDalSession session,
                                                        string BurgerServiceNummer,
                                                        string Voorletters,
                                                        string Tussenvoegsels,
                                                        string Naam,
                                                        Address PostalAddress,
                                                        Address ResidentialAddress,
                                                        IContactDetails ContactDetails,
                                                        Gender ContactGender,
                                                        INationality ContactNationality,
                                                        IIdentification Id,
                                                        DateTime Dob,
                                                        IManagementCompany AssetManager,
                                                        DateTime creationdate)
        {
            IContactPerson theContact = null;

            //1st see if the contact exists
            if (!LookupContactPersonByBSN(session, BurgerServiceNummer, out theContact))
            {
                if (!string.IsNullOrEmpty(Naam))
                {
                    theContact = new ContactPerson(Voorletters,
                                                    Tussenvoegsels,
                                                    ContactGender,
                                                    ContactNationality,
                                                    Naam,
                                                    PostalAddress,
                                                    ResidentialAddress,
                                                    ContactDetails);
                    theContact.BurgerServiceNummer = BurgerServiceNummer;
                    theContact.AssetManager = (IAssetManager)AssetManager;
                    theContact.Identification = Id;
                    theContact.DateOfBirth = Dob;
                    theContact.CreationDate = creationdate;
                }
            }
            return theContact;
        }
コード例 #11
0
 private static string getPdfReportsFolder(IManagementCompany managementCompany, string purposeSubfolder, 
                                           string periodName, string modelPortolioName)
 {
     if (managementCompany.PdfReportsFolder != null && managementCompany.PdfReportsFolder != string.Empty)
     {
         string pdfReportsFolder = string.Format(@"{0}\Reports\{1}\{2}\{3}",
                                                 managementCompany.PdfReportsFolder, purposeSubfolder, periodName, modelPortolioName);
         if (!Directory.Exists(pdfReportsFolder))
             Directory.CreateDirectory(pdfReportsFolder);
         return pdfReportsFolder;
     }
     else
         throw new ApplicationException(string.Format("PDF report-generation folder not set for management company '{0}'.",
                                                      managementCompany.CompanyName));
 }
コード例 #12
0
ファイル: ReportTemplate.cs プロジェクト: kiquenet/B4F
 public ReportTemplate(IManagementCompany managementCompany, string reportName, string reportTemplateName)
 {
     this.managementCompany = managementCompany;
     this.reportName = reportName;
     this.reportTemplateName = reportTemplateName;
 }
コード例 #13
0
ファイル: NotaPrintCommand.cs プロジェクト: kiquenet/B4F
 private string getPdfReportsFolder(IManagementCompany managementCompany, string purposeSubfolder, bool? showLogo)
 {
     if (managementCompany.PdfReportsFolder != null && managementCompany.PdfReportsFolder != string.Empty)
     {
         string pdfReportsFolder = string.Format(@"{0}\Notas\{1}\{2:yyyy.MM.dd}{3}",
                                                 managementCompany.PdfReportsFolder, purposeSubfolder, DateTime.Today,
                                                 showLogo == null ? "" : (bool)showLogo ? @"\WithLogo" : @"\NoLogo");
         if (!Directory.Exists(pdfReportsFolder))
             Directory.CreateDirectory(pdfReportsFolder);
         return pdfReportsFolder;
     }
     else
         throw new ApplicationException(string.Format("PDF report-generation folder not set for management company '{0}'.",
                                                      managementCompany.CompanyName));
 }
コード例 #14
0
ファイル: AccountTypeCustomer.cs プロジェクト: kiquenet/B4F
 /// <summary>
 /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.AccountTypeCustomer">AccountTypeCustomer</see> class.
 /// </summary>
 /// <param name="number">The Account's number</param>
 /// <param name="shortName">Shortname of the account</param>
 /// <param name="accountOwner">The owner of the account</param>
 /// <param name="modelPortfolio">The model portfolio the account is tied to</param>
 public AccountTypeCustomer(string number, string shortName, IManagementCompany accountOwner, IPortfolioModel modelPortfolio)
     : base(number, shortName, accountOwner)
 {
     this.ModelPortfolio = modelPortfolio;
 }
コード例 #15
0
ファイル: CustomerAccount.cs プロジェクト: kiquenet/B4F
 ///// <summary>
 ///// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.CustomerAccount">CustomerAccount</see> class.
 ///// </summary>
 ///// <param name="number">The Account's number</param>
 ///// <param name="shortName">Shortname of the account</param>
 ///// <param name="accountOwner">The owner of the account</param>
 ///// <param name="modelPortfolio">The model portfolio the account is tied to</param>
 ///// <param name="ah">An accountholder</param>
 //public CustomerAccount(string number, string shortName, IManagementCompany accountOwner, IPortfolioModel modelPortfolio, IAccountHolder ah)
 //    : base(number, shortName, accountOwner, modelPortfolio)
 //{
 //    this.UseManagementFee = true;
 //    if (ah != null)
 //    {
 //        this.AccountHolders.Add(ah);
 //    }
 //}
 public CustomerAccount(string number, string shortName, IManagementCompany accountOwner, DateTime creationDate)
     : this(number, shortName, accountOwner, null, creationDate)
 {
 }
コード例 #16
0
ファイル: AccountTypeInternal.cs プロジェクト: kiquenet/B4F
 /// <summary>
 /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.AccountTypeInternal">AccountTypeInternal</see> class.
 /// </summary>
 /// <param name="number">The Account's number</param>
 /// <param name="shortName">Shortname of the account</param>
 /// <param name="accountOwner">The owner of the account</param>
 public AccountTypeInternal(string number, string shortName, IManagementCompany AccountOwner)
     : base(number, shortName)
 {
     this.AccountOwner = AccountOwner;
     //glpositions = new GLPortfolio(this);
 }
コード例 #17
0
ファイル: ReportTemplateMapper.cs プロジェクト: kiquenet/B4F
 public static IReportTemplate GetReportTemplate(IDalSession session, IManagementCompany managementCompany, string reportName)
 {
     return GetReportTemplate(session, managementCompany, reportName, false);
 }
コード例 #18
0
ファイル: NostroAccount.cs プロジェクト: kiquenet/B4F
 /// <summary>
 /// The AccountType defines the type of account.
 /// </summary>
 /// 
 public NostroAccount(string number, string shortName, IManagementCompany accountOwner)
     : base(number, shortName, accountOwner)
 {
 }
コード例 #19
0
ファイル: ImportAccountsAdapter.cs プロジェクト: kiquenet/B4F
        private static IContactCompany CreateContactCompany(IDalSession session,
                                                        string KvKNummer,
                                                        string Naam,
                                                        Address PostalAddress,
                                                        Address ResidentialAddress,
                                                        IContactDetails ContactDetails,
                                                        DateTime dateOfFounding,
                                                        IManagementCompany AssetManager,
                                                        DateTime creationdate)
        {
            IContactCompany theCompany = null;

            if (!LookupContactCompanybyKVK(session, KvKNummer, out theCompany))
            {
                theCompany = new ContactCompany(Naam, PostalAddress, ResidentialAddress, ContactDetails, KvKNummer);
            }
            theCompany.DateOfFounding = dateOfFounding;
            theCompany.AssetManager = (IAssetManager)AssetManager;
            theCompany.CreationDate = creationdate;

            return theCompany;
        }