private bool SaveData() { bsHouse.EndEdit(); if (!CheckInput()) { return(false); } string strErr = string.Empty; if (Basic_Func.SaveHouse(ref _house, ref strErr)) { Common.Common_Func.ErrorMessage("库区保存成功!", "保存成功"); bsHouse.DataSource = _house; InitForm(); _back = Common.Common_Func.ConvertToModel <HouseInfo>(_house); return(true); } else { Common.Common_Func.ErrorMessage(strErr, "保存失败"); bsHouse.DataSource = _house; return(false); } }