/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private WHType EntityGet() { WHType entity = new WHType(); entity.ID = HTDataID; entity.SelectByID(); entity.Code = txtCode.Text.Trim(); entity.Name = txtName.Text.Trim(); entity.WHPosMethodID = SysConvert.ToInt32(txtWHPosMethodID.Text.Trim()); entity.ItemTypeID = SysConvert.ToInt32(txtItemTypeID.Text.Trim()); entity.Remark = txtRemark.Text.Trim(); entity.Tax = SysConvert.ToDecimal(txtTax.Text.Trim()); entity.ItemTypeID2 = SysConvert.ToInt32(txtItemTypeID2.Text.Trim()); entity.ItemTypeID3 = SysConvert.ToInt32(txtItemTypeID3.Text.Trim()); entity.ItemTypeID4 = SysConvert.ToInt32(txtItemTypeID4.Text.Trim()); entity.ItemTypeID5 = SysConvert.ToInt32(txtItemTypeID5.Text.Trim()); return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { WHType entity = new WHType(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtCode.Text = entity.Code.ToString(); txtName.Text = entity.Name.ToString(); txtWHPosMethodID.Text = entity.WHPosMethodID.ToString(); txtItemTypeID.Text = entity.ItemTypeID.ToString(); txtRemark.Text = entity.Remark.ToString(); txtTax.Text = entity.Tax.ToString(); txtItemTypeID2.Text = entity.ItemTypeID2.ToString(); txtItemTypeID3.Text = entity.ItemTypeID3.ToString(); txtItemTypeID4.Text = entity.ItemTypeID4.ToString(); txtItemTypeID5.Text = entity.ItemTypeID5.ToString(); if (!findFlag) { } }