public int UpdateOperationCanceled(MED_OPERATION_CANCELED item) { int result = dapper.Set <MED_OPERATION_CANCELED>().Save(item) == true ? 1 : 0; dapper.SaveChanges(); return(result); }
/// <summary> /// 保存手术取消记录数据 /// </summary> private void SaveOperationCanceled(ref TransactionParamsters tp) { MED_OPERATION_SCHEDULE scheduled = AnesInfoService.ClientInstance.GetOperSchedule(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID, this.CurPatientModel.OperID); List <MED_OPERATION_CANCELED> list = CommonService.ClientInstance.GetOperationCanceled(this.CurPatientModel.PatientID, this.CurPatientModel.VisitID); MED_OPERATION_CANCELED newRow = new MED_OPERATION_CANCELED(); newRow.PATIENT_ID = this.CurPatientModel.PatientID; newRow.VISIT_ID = this.CurPatientModel.VisitID; newRow.CANCEL_ID = list.Count + 1; newRow.SCHEDULE_ID = null != scheduled ? scheduled.SCHEDULE_ID : 1; newRow.OPER_ID = this.CurPatientModel.OperID; newRow.OPER_STATUS_CODE = (int)this.CurPatientModel.OperStatusCode; newRow.CANCEL_REASON = this.strReason; newRow.CANCEL_DATE = DateTime.Now; newRow.CANCEL_BY = string.Empty; newRow.ENTERED_BY = ExtendAppContext.Current.LoginUser.USER_JOB_ID; newRow.ModelStatus = ModelStatus.Add; list.Add(newRow); tp.Append(list); this.SaveOperationCanceledDetail(newRow.CANCEL_ID, ref tp); }
public RequestResult <int> UpdateOperationCanceled(MED_OPERATION_CANCELED item) { string address = "PacuCommon/UpdateOperationCanceled"; return(BaseRepository.PostCallApi <MED_OPERATION_CANCELED>(address, item)); }
private int GetMaxOperCancelCancelID(MED_OPERATION_CANCELED item) { string sql_GetMaxOperCancelCancelID = sqlDict.GetSQLByKey("GetMaxOperCancelCancelID"); return(dapper.ExecuteScalar <int>(sql_GetMaxOperCancelCancelID, new { PatientID = item.PATIENT_ID, VisitID = item.VISIT_ID, ScheduleID = item.SCHEDULE_ID })); }
public RequestResult <int> UpdateOperationCanceled(MED_OPERATION_CANCELED item) { return(Success(_commonService.UpdateOperationCanceled(item))); }