/// <summary> /// 운전자 수정 /// </summary> /// <param name="carHandler"></param> /// <returns></returns> public int updateCarHandler(CarHandlerInfo carHandler) { log.Debug("=================START updateCarHandler================="); log.Debug("carHandler = " + carHandler.ToString()); StringBuilder sql = new StringBuilder(); sql.Append(@"UPDATE CarHandler SET handler=N'" + carHandler.Handler + "',handlerPhone='" + carHandler.Phone + "',VisFlag='" + carHandler.VisFlag + @"' WHERE carhandlerCode=" + carHandler.CarHandlerCode); int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql.ToString(), null); return(result); log.Debug("=================END updateCarHandler================="); }
/// <summary> /// 운전자 삭제 /// </summary> /// <param name="carCode"></param> /// <returns></returns> public int deleteCarHandler(CarHandlerInfo carHandler) { log.Debug("=================START deleteCarhandler================="); log.Debug("carHandler = " + carHandler.ToString()); StringBuilder sql = new StringBuilder(); sql.Append(@"DELETE FROM CarHandler WHERE carHandlerCode=" + carHandler.CarHandlerCode); int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql.ToString(), null); return(result); log.Debug("=================END deleteCarhandler================="); }
/// <summary> /// 운전자 등록 /// </summary> /// <param name="carHandler"></param> /// <returns></returns> public int insertCarHandler(CarHandlerInfo carHandler) { log.Debug("=================START insertCarHandler================="); log.Debug("carHandler = " + carHandler.ToString()); String sql_insert = "INSERT INTO CarHandler (carCode,handler,handlerPhone,regDate,VisFlag)"; sql_insert += "VALUES"; sql_insert += "(" + carHandler.CarCode + ",N'" + carHandler.Handler + "','" + carHandler.Phone + "',GETDATE(),'Y')"; int result = SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, sql_insert, null); return(result); log.Debug("=================END insertCarHandler================="); }