Beispiel #1
0
 public Company(CompanyType type)
 {
     this.type   = type;
     Name        = type.ToString();
     MaxShare    = 25;
     remainShare = 25;
     tileCount   = 0;
 }
Beispiel #2
0
        /// <summary>
        /// 获取公司类型中文名,增加类型时需更改
        /// </summary>
        /// <param name="companyType"></param>
        /// <returns></returns>
        private string GetCompanyName(CompanyType companyType)
        {
            string str = companyType.Discription();

            if (string.IsNullOrEmpty(str))
            {
                str = companyType.ToString();
            }
            return(str);
        }
Beispiel #3
0
        public static List <Company> GetCompanyByType(CompanyType type)
        {
            List <Company> cp = new List <Company>();

            using (GiffiDBEntities dc = new GiffiDBEntities())
            {
                cp = (from c in dc.Companies
                      where c.CompanyType.Equals(type.ToString(), StringComparison.InvariantCultureIgnoreCase)
                      select c).ToList();
            }
            return(cp);
        }
Beispiel #4
0
        public static string GetFormattedCompanyType(CompanyType companyType)
        {
            switch (companyType)
            {
            case CompanyType.ProductCompany: return("Product Company");

            case CompanyType.Holding: return("Holding Company");

            case CompanyType.Corporation: return("Corporation");

            case CompanyType.FinancialGroup: return("Investment Company");

            case CompanyType.Group: return("Group of companies");

            default: return("WUT " + companyType.ToString());
            }
        }
        protected override void ProcessRecord()
        {
            if (Contacts != null)
            {
                if (Contacts.Count == 3 & Contacts.Any(x => x.ContactType == "Billing") & Contacts.Any(y => y.ContactType == "Admin") & Contacts.Any(z => z.ContactType == "Emergency"))
                {
                    var company = new Company
                    {
                        DisplayName         = DisplayName,
                        Email               = Email,
                        ErpAddressNo        = ERPAddressNo,
                        BillingCurrency     = BillingCurrency.ToString(),
                        BusinessPhone       = BusinessPhone,
                        ChamberOfCommerceNo = ChamberOfCommerceNo,
                        CompanyType         = CompanyType.ToString(),
                        Contacts            = Contacts,
                        Country             = Country,
                        CrmId               = CRMId,
                        LanguageId          = Language.ToString(),
                        Fax        = Fax,
                        Street1    = Street1,
                        Street2    = Street2,
                        LegalName  = LegalName,
                        PostalCode = PostalCode,
                        Town       = Town,
                        VatNo      = VatNo
                    };

                    var job = Create(Connection, company);


                    if (Wait)
                    {
                        WriteObject(WaitJobFinished(job.Id, Connection));
                    }
                    else
                    {
                        WriteObject(job);
                    }
                }
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        CompanyType c = (CompanyType)5;

        Response.Write(c.ToString());
    }
Beispiel #7
0
 /// <summary>
 /// 获取公司类型中文名,增加类型时需更改
 /// </summary>
 /// <param name="companyType"></param>
 /// <returns></returns>
 private string GetCompanyName(CompanyType companyType)
 {
     return(companyType.ToString());
 }
Beispiel #8
0
 public string Stringify()
 {
     return("Household at " + Origin.ToString() + " couldn't eat out, since there were no outlets of type " + OutletType.ToString() + " nearby (within " + Radius + " units).");
 }