예제 #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;
        }
예제 #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;
        }
예제 #3
0
파일: CrmTest1.cs 프로젝트: ssjylsg/crm
        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);
        }