Exemplo n.º 1
0
        public CompanyClass FillCompanyInfo(Company model)
        {
            HasanHoutoneEntities bc  = new HasanHoutoneEntities();
            CompanyClass         obj = new CompanyClass();

            obj.CompanyKey        = model.CompanyKey;
            obj.CompanyID         = model.CompanyID;
            obj.CompanyName       = model.CompanyName;
            obj.CompanyAddress    = model.CompanyAddress;
            obj.CompanyPhone      = model.CompanyPhone;
            obj.CompanyMobile     = model.CompanyMobile;
            obj.CompanyEmail      = model.CompanyEmail;
            obj.CompanyWebsite    = model.CompanyWebsite;
            obj.CompanyFax        = model.CompanyFax;
            obj.ContactPersonName = model.ContactPersonName;
            obj.ContactPersonNo   = model.ContactPersonNo;
            obj.Logo         = model.Logo;
            obj.LogoType     = model.LogoType;
            obj.IsDelete     = model.IsDelete;
            obj.StateCode    = model.StateCode;
            obj.CityKey      = model.CityKey;
            obj.ZIPKey       = model.ZIPKey;
            obj.Title        = model.Title;
            obj.ContactEmail = model.ContactEmail;

            return(obj);
        }
Exemplo n.º 2
0
 public CompanyClass ValidateCompanyClass(CompanyClass model)
 {
     if (String.IsNullOrEmpty(model.CompanyID))
     {
         model.CompanyID = model.CompanyName;
     }
     if (String.IsNullOrEmpty(model.CompanyFax))
     {
         model.CompanyFax = "n/a";
     }
     if (String.IsNullOrEmpty(model.CompanyAddress))
     {
         model.CompanyAddress = "n/a";
     }
     if (String.IsNullOrEmpty(model.CompanyPhone))
     {
         model.CompanyPhone = "n/a";
     }
     if (String.IsNullOrEmpty(model.CompanyMobile))
     {
         model.CompanyMobile = "n/a";
     }
     if (String.IsNullOrEmpty(model.CompanyEmail))
     {
         model.CompanyEmail = "n/a";
     }
     if (String.IsNullOrEmpty(model.Title))
     {
         model.Title = "n/a";
     }
     if (String.IsNullOrEmpty(model.ContactEmail))
     {
         model.ContactEmail = "n/a";
     }
     if (String.IsNullOrEmpty(model.CompanyWebsite))
     {
         model.CompanyWebsite = "n/a";
     }
     if (String.IsNullOrEmpty(model.ContactPersonName))
     {
         model.ContactPersonName = "n/a";
     }
     if (String.IsNullOrEmpty(model.ContactPersonNo))
     {
         model.ContactPersonNo = "n/a";
     }
     return(model);
 }