public UpdateOperationMasterResponseDto UpdateOperationMaster(UpdateOperationMasterRequestDto updateOperationMasterRequestDto) { var cModel = new UpdateOperationMasterCM { OperationCode = updateOperationMasterRequestDto.OperationCode, OperationName = updateOperationMasterRequestDto.OperationName }; var response = operationMastersRepository.UpdateOperationMaster(cModel); return(new UpdateOperationMasterResponseDto()); }
public UpdateOperationMasterQM UpdateOperationMaster(UpdateOperationMasterCM updateOperationMasterCM) { using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new OperationMasterUpdateCommand { Connection = connection }; command.Execute(updateOperationMasterCM); } return(new UpdateOperationMasterQM()); }
public void Execute(UpdateOperationMasterCM model) { using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].uspUpdateOperationMaster"; sqlCommand.CommandType = CommandType.StoredProcedure; sqlCommand.Parameters.Add(AddParameter("@OperationCode", SsDbType.Decimal, ParameterDirection.Input, Convert.ToInt32(model.OperationCode))); sqlCommand.Parameters.Add(AddParameter("@OperationName", SsDbType.VarChar, ParameterDirection.Input, model.OperationName)); sqlCommand.Parameters.Add(AddParameter("@UpdatedBy", SsDbType.UniqueIdentifier, ParameterDirection.Input, new Guid())); sqlCommand.Parameters.Add(AddParameter("@UpdatedDateTime", SsDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow)); sqlCommand.ExecuteNonQuery(); } }