/// <summary> /// 保存方法 /// </summary> /// <returns></returns> private bool Save() { SResult rst = new SResult(); if (this.DialogStatus == UBaseLib.Enums.DialogStatus.New) //新增 { this.DataEntity = new ClinicarAllCheck(); this.Fill2Entity(); rst = clinicarAllCheckBiz.Insert(this.DataEntity); } else if (this.DialogStatus == UBaseLib.Enums.DialogStatus.Modify) //修改 { this.Fill2Entity(); rst = clinicarAllCheckBiz.Update(this.DataEntity); } if (rst.success) { UcMessageBox.Information(rst.message, "提示"); } else { UcMessageBox.Error(rst.message, "提示"); } return(rst.success); }
public SResult Update(ClinicarAllCheck ClinicarAllCheck) { SResult rst = new SResult(); ClinicarAllCheckDao.Update(ClinicarAllCheck); rst.success = true; rst.data = ClinicarAllCheck; rst.message = "修改成功!"; return(rst); }
public SResult Insert(ClinicarAllCheck ClinicarAllCheck) { SResult rst = new SResult(); ClinicarAllCheckDao.Insert(ClinicarAllCheck); rst.success = true; rst.data = ClinicarAllCheck; rst.message = "新增成功!"; return(rst); }
/// <summary> /// 按检查码查询 /// </summary> /// <param name="sn"></param> /// <returns></returns> public ClinicarAllCheck FindByCheckNumber(string checkNumber) { IList <ClinicarAllCheck> list = ClinicarAllCheckDao.FindByHql(" and check_number=?", new Object[] { checkNumber }, "id asc"); ClinicarAllCheck ClinicarAllCheck = null; if (list.Count() > 0) { ClinicarAllCheck = list[0]; } return(ClinicarAllCheck); }