/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private CompanyType EntityGet() { CompanyType entity = new CompanyType(); entity.ID = HTDataID; entity.SelectByID(); entity.Code = txtCode.Text.Trim(); entity.Name = txtName.Text.Trim(); entity.OrganizeCode = txtOrganizeCode.Text.Trim(); entity.Tel = txtTel.Text.Trim(); entity.Fax = txtFax.Text.Trim(); entity.Address = txtAddress.Text.Trim(); entity.ZipCode = txtZipCode.Text.Trim(); entity.TaxCode = txtTaxCode.Text.Trim(); entity.Bank = txtBank.Text.Trim(); entity.Account = txtAccount.Text.Trim(); entity.BasedCurrency = txtBasedCurrency.Text.Trim(); entity.DealCurrency = txtDealCurrency.Text.Trim(); entity.Remark = txtRemark.Text.Trim(); entity.EnName = txtEnName.Text.Trim(); entity.EnAddress = txtEnAddress.Text.Trim(); entity.AllName = txtAllName.Text.Trim(); return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { CompanyType entity = new CompanyType(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtCode.Text = entity.Code.ToString(); txtName.Text = entity.Name.ToString(); txtOrganizeCode.Text = entity.OrganizeCode.ToString(); txtTel.Text = entity.Tel.ToString(); txtFax.Text = entity.Fax.ToString(); txtAddress.Text = entity.Address.ToString(); txtZipCode.Text = entity.ZipCode.ToString(); txtTaxCode.Text = entity.TaxCode.ToString(); txtBank.Text = entity.Bank.ToString(); txtAccount.Text = entity.Account.ToString(); txtBasedCurrency.Text = entity.BasedCurrency.ToString(); txtDealCurrency.Text = entity.DealCurrency.ToString(); txtRemark.Text = entity.Remark.ToString(); txtEnName.Text = entity.EnName.ToString(); txtEnAddress.Text = entity.EnAddress.ToString(); txtAllName.Text = entity.AllName.ToString(); if (!findFlag) { } }
//公司别改变带入相关信息 private void drpCompanyTypeID_EditValueChanged(object sender, EventArgs e) { try { CompanyType entity = new CompanyType(); entity.ID = SysConvert.ToInt32(drpCompanyTypeID.EditValue); entity.SelectByID(); txtAname.Text = entity.AllName; txtAaddress.Text = entity.Address; txtAfax.Text = entity.Fax; txtAtel.Text = entity.Tel; } catch (Exception E) { this.ShowMessage(E.Message); } }