Example #1
0
        private void DataToFace(Company value)
        {
            txtParentName.Text = ParentName;
            if (value == null)
            {
                return;
            }

            this.NameID.Text = value.Name;
            this.FullNameID.Text = value.FullName;
            this.ZipCodeID.Text = value.ZipCode;
            this.AddressID.Text = value.Address;
            this.WebsiteID.Text = value.Website;
            this.FaxID.Text = value.Fax;
            this.RemarkID.Text = value.Remark;
        }
Example #2
0
        private void FaceToData(ref Company customer)
        {
            if (customer == null)
            {
                customer = new Company();
                customer.Optor = this.CurrentOperatorUser;

            }
            customer.ModifyTime = DateTime.Now;
            customer.Name = this.NameID.Text;
            customer.FullName = this.FullNameID.Text;
            customer.ZipCode = this.ZipCodeID.Text;
            customer.Address = this.AddressID.Text;
            customer.Website = this.WebsiteID.Text;
            customer.Parent = this.Service.FindById(this.ParentId);
            customer.Fax = this.FaxID.Text;
            customer.Remark = this.RemarkID.Text;
        }
Example #3
0
        public void CompanyTest()
        {
            ICompanyService companyService = WebCrm.Framework.DependencyResolver.Resolver<ICompanyService>();
            Company company = new Company();
            company.Address = "浙江";
            company.Fax = "3525";
            company.FullName = "杭州深大集团总公司";
            company.Name = "深大";

            company.Optor = this._operatorUser;
            company.Website = "www.baidu.com";

            companyService.Save(company);

            Assert.IsNotNull(companyService.FindById(company.Id));
            company.Fax = company.Fax + "asdfasd";

            companyService.Update(company);
        }