private void FaceToData(ref Cooperation value) { value.Name = this.NameID.Text;//姓名 value.TelNo = this.TelNoID.Text; //联系号码 value.Email = this.EmailID.Text; //Email value.ContactName = this.ContactNameID.Text;//联系人姓名 value.Fax = this.FaxID.Text;//传真 value.Address = this.AddressID.Text;//地址 value.CreateDate = DateTime.Parse(this.CreateDateID.Text);//合作时间 value.Remark = this.RemarkID.Text;//备注 value.Company = this.CurrentCompany; }
private void DataToFace(Cooperation value) { if (value != null) { this.NameID.Text = value.Name; //姓名 this.TelNoID.Text = value.TelNo; //联系号码 this.EmailID.Text = value.Email; //Email this.ContactNameID.Text = value.ContactName; //联系人姓名 this.FaxID.Text = value.Fax; //传真 this.AddressID.Text = value.Address;//地址 this.CreateDateID.Text = value.CreateDate.ToShortDateString();//合作时间 this.RemarkID.Text = value.Remark;//备注 } }