private bool SaveData() { if (!CheckInput()) { return(false); } string strErr = string.Empty; if (Basic_Func.SavePreparation(ref _preparation, ref strErr)) { Common.Common_Func.ErrorMessage("制法保存成功!", "保存成功"); bsPreparation.DataSource = _preparation; InitForm(); _back = Common.Common_Func.ConvertToModel <Preparation>(_preparation); return(true); } else { Common.Common_Func.ErrorMessage(strErr, "保存失败"); bsPreparation.DataSource = _preparation; return(false); } }